Commit Graph

2146 Commits

Author SHA1 Message Date
Brad King b9850a614e Log implicit link information parsing actions
This commit teaches the CMAKE_PARSE_IMPLICIT_LINK_INFO function to log
its actions.  We store the log in CMakeFiles/CMakeOutput.log at the top
of the project build tree.  This will make diagnosis of implicit link
information parsing problems easier.
2009-10-06 15:16:12 -04:00
Brad King d0c03f804f Use work-around from bug 4772 for C++ and Fortran
The commit "fix for bug 4772" added a work-around to CMakeCInformation
for platform config files that put compiler information in the system
file (like SunOS flags for GCC).  This commit adds the same work-around
for CXX and Fortran.  It is necessary to support enabling these
languages separately from C in other subdirectories.

The commit "Avoid (Unix|Windows)Paths.cmake multiple include" added
include blockers that prevent the files from multiple inclusion, so it
is safe to include the system information files from every language.

See issue #4772 and issue #9656.
2009-10-06 11:06:38 -04:00
James Bigler 7112227c18 Updated copyright notice to conform to NVIDIA guidelines. 2009-10-05 17:14:33 -04:00
Brad King f7cfd5c99f FortranCInterface: Mangling for Intel on Windows
The Intel Fortran compiler for Windows uses upper-case symbol names with
no trailing underscore.
2009-10-05 16:30:58 -04:00
Bill Hoffman 0556075034 Teach intel compiler on windows to place .lib files and .pdb files. 2009-10-05 13:17:53 -04:00
Brad King b133467567 CPack: Fix bash-isms in launch script
Patch from Raphael Geissert and Modestas Vainius.  See issue #9659.
2009-10-05 13:14:30 -04:00
Bill Hoffman 57ece74730 Teach intel compiler on windows to place .lib files and .pdb files. 2009-10-05 12:49:51 -04:00
Brad King f98a4e63fd Avoid (Unix|Windows)Paths.cmake multiple include
Block multiple inclusion because "Modules/CMakeCInformation.cmake"
includes "Platform/${CMAKE_SYSTEM_NAME}" even though the generic
module "CMakeSystemSpecificInformation.cmake" already included it.

The extra inclusion is a work-around to address issue #4772 without
intrusive platform file changes.  Once those changes are made the
work-around and these include blockers can be removed.  See issue #9656.
2009-10-05 11:47:25 -04:00
Brad King 3dc80f8d8c Add copyright notice to (Unix|Windows)Paths.cmake
This commit adds our copyright notice to these non-trivial platform
modules.
2009-10-05 11:47:05 -04:00
Clinton Stimpson bca63bb738 When getting include dirs for moc, also watch for framework includes and use -F instead of -I. 2009-10-05 11:21:30 -04:00
Brad King c118fd4c55 Find locally installed software first
This commit re-orders the search path prefix list from

  /
  /usr
  /usr/local

to

  /usr/local
  /
  /usr

so that locally-installed software is preferred.

This makes the search consistent with the Filesystem Hierarchy Standard:

  http://www.pathname.com/fhs/

See issue #9657.
2009-10-05 11:09:15 -04:00
Brad King 282b4e3776 Fix module docs to be manpage (groff) friendly
Most problems are fixed (or rather worked-around) by making long '====='
separators pre-formatted (i.e. prefixed with two spaces).  In order to
preserve visual view, the code examples themselves are prefixed with 3
spaces.

This commit fixes the following man warnings:

$ cmake --help-man - | LANG=C MANWIDTH=80 man --warnings -l - > /dev/null
  <standard input>:6024: warning [p 105, 1.7i]: can't break line
  <standard input>:6027: warning [p 105, 2.7i]: cannot adjust line
  <standard input>:6027: warning [p 105, 2.8i]: can't break line
  <standard input>:7142: warning [p 117, 7.8i]: can't break line
  <standard input>:7171: warning [p 117, 11.8i]: can't break line
  <standard input>:8878: warning [p 136, 9.0i]: can't break line
  <standard input>:8887: warning [p 136, 11.5i]: cannot adjust line
  <standard input>:8887: warning [p 136, 11.7i]: can't break line
  <standard input>:8904: warning [p 136, 14.2i]: can't break line

Patch from Modestas Vainius.  See issue #9659.
2009-10-05 10:28:05 -04:00
Brad King 451d68b7e3 Support GNU/kFreeBSD
GNU/kFreeBSD = FreeBSD kernel + userspace with glibc.  Linux.cmake
doesn't contain anything too OS specific, so we can forward to it.

Here are outputs of /bin/uname on author's machine:
  uname -p ==> i386
  uname -o ==> GNU/kFreeBSD
  uname -s ==> GNU/kFreeBSD
  uname -r ==> 5.4-1-686

Patch from Modestas Vainius.  See issue #9659.
2009-10-05 10:26:50 -04:00
Brad King a0e63cff1d FindQt3: Prefer (moc|uic)-qt3 names over (moc|uic)
On Debian moc and uic from Qt3 have '-qt3' suffixes.  The latter names
might come from Qt4, so prefer the version-specific names.

Patch from Modestas Vainius.  See issue #9659.
2009-10-05 10:25:36 -04:00
Brad King 940733997a Remove old license from FindPkgConfig.cmake module
This module was contributed under a BSD-like license.  We added CMake's
OSI-approved BSD License on top of it.  With the author's permission,
this commit removes the old license text and puts the author's copyright
notice in the block referring to the new license.
2009-10-05 09:13:29 -04:00
David Cole b272c61945 Fix issue #8649 - move the location of CPACK_NSIS_EXTRA_INSTALL_COMMANDS so that it is not excluded from execution when 'Do not create shortcuts' is checked. 2009-10-04 14:19:43 -04:00
Alexander Neundorf e364dc784f some syncing with the FindQt4.cmake from KDE
-remove the parentheses in the if() conditions, they don't change the
result, and without them these lines are identical to the ones in
FindQt4.cmake from KDE
-mention which qmake was used for finding Qt

Alex
2009-10-04 11:31:30 -04:00
Alexander Neundorf 3563e6f44e -add the additional features for the dbus macros from KDE's FindQt4.cmake
Alex
2009-10-03 12:04:15 -04:00
Brad King c513962701 Create INTERPROCEDURAL_OPTIMIZATION build feature
This commit creates target and directory properties to enable the Intel
interprocedural optimization support on Linux.  Enabling it adds the
compiler option '-ipo' and uses 'xiar' to create archives.

See issue #9615.
2009-10-02 13:52:13 -04:00
Brad King d455eeb6d7 Fix typo in Intel xiar search code
This renames the variable '_intel_xair_hints' to '_intel_xiar_hints'.
2009-10-02 13:24:32 -04:00
Bill Hoffman 07c3597a86 Fix the documentation to say what it really does. Bug #9638 2009-10-02 08:44:51 -04:00
Alexander Neundorf 61a1ec5f20 document how the minimum version can be specified
Alex
2009-10-01 16:48:19 -04:00
Clinton Stimpson 86459a89a1 Add documentation for Cocoa flag and move Motif under X11 flag. 2009-10-01 16:41:00 -04:00
Clinton Stimpson 023162256d QtHelp depends on QtNetwork 2009-10-01 16:12:39 -04:00
Brad King cc11846dbf Add missing copyright notice to CMake.cmake module 2009-10-01 14:05:33 -04:00
Philip Lowman e8cdd54f74 Some bugfixes, also added public function for closer integration btwn GoogleTest & CTest, contributed by Dan Blezek.
Other minor changes:
* Enhanced documentation & added examples
* _INCLUDE_DIRS and _LIBRARIES was being set regardless of _FOUND
* Fixed status message to include library rather than include dir
* Improved detection of MSVC compiled libraries
* Added a variable (GTEST_BOTH_LIBRARIES) for libgtest + libgtest_main
2009-10-01 01:12:40 -04:00
David Cole f95bc6b5ad Eliminate ExternalProject's use of CMAKE_CFG_INTDIR subdir for Makefile generators. It was causing problems with parallel make -j invocations. Keep it for multi-configuration build systems so that Debug and Release stamp files remain separate. 2009-09-30 16:22:36 -04:00
Bill Hoffman 122c7f6179 Fix for bug #9611, some more paths for OpenJDK. 2009-09-30 14:15:23 -04:00
Bill Hoffman b5bc1d9f74 Fix for bug #9611 do not hard code archs for search paths of java, look at the machine type. 2009-09-30 09:59:00 -04:00
Bill Hoffman 86c3a39e86 Fix bug#9619 add a link to module maintainers page in readme.txt for Modules 2009-09-30 09:53:48 -04:00
Brad King e1729238c9 Add initial XL C compiler flags for safer builds
This commit adds some default initial C flags for the XL compiler.  The
most important is "-qhalt=e" which causes the compiler to error-out on
non-severe error messages.  This is necessary to get try-compiles to
fail when bad arguments are passed to a function.
2009-09-30 09:38:23 -04:00
Brad King 6d434ee6cc Split XL compiler information files
This moves platform-independent XL compiler flags into separate
"Compiler/XL-<lang>.cmake" modules.  Platform-specific flags go in
"Platform/<os>-XL-<lang>.cmake" modules.
2009-09-30 09:37:35 -04:00
Brad King f40406ed6b Fix default install prefix on Haiku
Since Haiku does not have /usr (and therefore /usr/local), this commit
changes the default install prefix to the equivalent directory of
/boot/common.

See issue #9607.
2009-09-30 08:31:53 -04:00
Brad King 869440f75a Fix shared library creation flag for XL on Linux
See issue #9617.
2009-09-29 13:56:57 -04:00
James Bigler b0744ad969 Updated the license on top of each file. 2009-09-29 00:07:46 -04:00
James Bigler c66fb80171 Removed support for cutil library and header file.
Cutil was never intented to be used outside of the SDK.  The removal of this
code is in support of this.  The CUDA_SDK_ROOT_DIR will continue to be
supported, in case users wish to use this to find files in the SDK.  There are
also two examples of how to use CUDA_SDK_ROOT_DIR to find header files and
libraries if users so wish.
2009-09-28 23:41:40 -04:00
James Bigler a26dac2202 Fixed CUDA_PROPAGATE_HOST_FLAGS, added path for Mac SDK.
The CUDA_PROPAGATE_HOST_FLAGS was incorrect in that it prevented the CUDA_NVCC_FLAGS_CONFIG variable from getting filled.

Also, added a search path for the CUDA SDK install on Macs.
2009-09-28 23:17:13 -04:00
David Cole 23dbb3b803 Fix issue #9412 - remove RPATH from files copied by BundleUtilities.cmake on Linux. Thanks to Clinton Stimpson for the patch. 2009-09-28 17:43:52 -04:00
David Cole b5265c2475 Fix issue #9395 - only return true for .exe files on Windows from the is_file_executable function. Makes behavior of this function conceptually consistent with Mac and Linux behavior. Thanks to Clinton Stimpson for the patch. 2009-09-28 17:35:40 -04:00
Brad King 3a666595c9 Convert CMake non-find modules to BSD License
This adds copyright/license notification blocks CMake's non-find
modules.  Most of the modules had no notices at all.  Some had notices
referring to the BSD license already.  This commit normalizes existing
notices and adds missing notices.
2009-09-28 11:46:51 -04:00
Brad King c4bb9c9d42 Convert CMake find-modules to BSD License
This adds copyright/license notification blocks CMake's find-modules.
Many of the modules had no notices at all.  Some had notices referring
to the BSD license already.  This commit normalizes existing notices and
adds missing notices.
2009-09-28 11:45:50 -04:00
Brad King 393b09cb85 Convert FindCUDA helper newlines from CRLF to LF
These files were committed to the repository with Windows newlines.
This converts them to Unix newlines so they will show up natively.
2009-09-28 11:04:33 -04:00
Alexander Neundorf b53217339d Correct comments and use ASM${ASM_DIALECT} env. var instead of ASM env. var to initialize the the assembler to use.
Alex
2009-09-26 05:20:03 -04:00
Alexander Neundorf bed34fd7c7 document the RUBY_VERSION variable
Alex
2009-09-26 05:08:20 -04:00
Brad King 1a527daa3b Convert newlines from CRLF to LF
These files were committed to the repository with Windows newlines.
This converts them to Unix newlines so they will show up natively.
2009-09-25 15:42:53 -04:00
James Bigler d468145fa2 Documentation fixes, new CUDA_PROPAGATE_HOST_FLAGS, changed output directory.
- Finished updating and formatting documentation.
- Added CUDA_PROPAGATE_HOST_FLAGS (Default ON) that can disable the C flag
propagation to the host compiler.
_ Changed the output directory for support files from
${CMAKE_CURRENT_BINARY_DIR} to ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles.  This
will hopefully reduce the clutter in the binary directory.
2009-09-25 00:28:12 -04:00
David Cole c181408ad8 BUG: Fix issue #8177. Modify the system PATH for all users when requested during an NSIS based installer run. Thanks to Bart Janssens for the patch. 2009-09-24 14:59:24 -04:00
James Bigler b7142e9214 Updated formatting of documentation plus a little reorganization. 2009-09-23 01:01:51 -04:00
James Bigler fb9d7d3c59 Added a command to make the output directory. This is to fix the XCode build that uses a different output directory than other systems, and rather than try to match that we'll just make it. 2009-09-23 00:50:16 -04:00
Clinton Stimpson 36606b6d73 add support for finding qcollectiongenerator executable. fixes #9248. 2009-09-22 18:44:24 -04:00
Clinton Stimpson 3551bc31f1 Add support for Qt configured with custom qtlibinfix (see issue 9571). Also fix CMP 15 warnings. 2009-09-22 16:28:13 -04:00
Brad King 5195a664b9 Skip implicit link info for multiple OS X archs
Implicit link information contains architecture-specific libraries and
directories.  The link information cannot be explicitly specified safely
when CMAKE_OSX_ARCHITECTURES contains more than one architecture.

As a result, we currently cannot support mixed-language C++/Fortran
targets and OS X universal binaries simultaneously.  In order to avoid
conflicts for simple C/C++ cases, we now simply skip detection of
implicit link information in this case.
2009-09-22 16:02:39 -04:00
Philip Lowman 30e3dba27c Make Boost easier to find 2009-09-21 23:42:39 -04:00
Clinton Stimpson ad5a455bb5 Fix issue 9581. Qt 4.5+ needs gobject-2.0. 2009-09-21 23:07:44 -04:00
Philip Lowman bc79890205 Add a blank line to my contributed find modules to prevent copyright info from showing up in CMake docs 2009-09-21 22:38:12 -04:00
Philip Lowman 448f88d46b Fix Bug #9158: FindBoost.cmake does not work properly with nmake and icl 2009-09-21 22:21:51 -04:00
Philip Lowman a8f4d4c9ba Fix glitch where we were accidently unsetting CMAKE_FIND_LIBRARY_PREFIXES 2009-09-20 23:55:47 -04:00
Philip Lowman a927ea410f Forgot to mark Protobuf cache variables as advanced 2009-09-20 21:15:33 -04:00
Philip Lowman 450c30b52b [NEW Module] FindAlsa audio library (Advanced Linux Sound Architecture) 2009-09-20 20:20:25 -04:00
Philip Lowman 301c038aeb [NEW Module] Find and use Google's Protocol Buffers library & compiler 2009-09-20 20:12:39 -04:00
Philip Lowman 9c2a38b836 Fix boost library detection with Sun Studio compiler (Issue #9153) 2009-09-20 11:33:06 -04:00
Philip Lowman 42618d5524 Improve readability 2009-09-20 08:03:45 -04:00
Brad King 180c60a86f Fix check for -isysroot on OS X
Previously we checked for this flag by parsing the version number of GCC
out of 'gcc --version', but this is not reliable because the format can
vary greatly.  Now we run 'gcc -v --help' and look for '-isysroot' in
the list of options.

We also now store the result on a per-language basis in the per-compiler
info file "CMake<LANG>Compiler.cmake".  This is necessary to make it
accessible from try-compile projects so that they generate correctly.
2009-09-19 10:14:31 -04:00
Alexander Neundorf 196d9a54aa The preprocessing and assembly rules also need the <DEFINES>, otherwise different reults are created.
Alex
2009-09-19 04:33:10 -04:00
Bill Hoffman 58818d5168 Add detection of gcc versions that do not support isysroot option and do not use it for them. 2009-09-18 14:22:20 -04:00
David Cole cba1dd59fd Better error message tells user possible ways to resolve the error. 2009-09-18 12:56:49 -04:00
Brad King 83957d9e0d Fix CHECK_(C|CXX)_COMPILER_FLAG for XL and SunPro
These compilers warn and return 0 for unrecognized flags.  We fix the
compiler flag check macros by looking for a warning in the output.  We
also update the regex for GNU on older Macs.  See issue #9516.
2009-09-18 09:49:44 -04:00
Brad King 53fb07ef5d Fix CHECK_(C|CXX)_COMPILER_FLAG for HP
This compiler warns and returns 0 for unrecognized flags.  We fix the
compiler flag check macros by looking for a warning in the output.
See issue #9516.
2009-09-17 17:16:43 -04:00
Brad King 7e3d437d0a Fix CHECK_(C|CXX)_COMPILER_FLAG for GNU and MSVC
These compilers warn and return 0 for unrecognized flags.  We fix the
compiler flag check macros by looking for a warning in the output.
See issue #9516.
2009-09-17 15:32:54 -04:00
Brad King ca76645ab7 Add FAIL_REGEX to CHECK_(C|CXX)_SOURCE_COMPILES
This teaches the CHECK_C_SOURCE_COMPILES and CHECK_CXX_SOURCE_COMPILES
macros to recognize a FAIL_REGEX option.  If they see the regular
expression in the output of the test compilation, the check fails.
2009-09-17 15:29:01 -04:00
Brad King 80af3ae35d Cleanup generic compiler check macro documentation
This commit improves formatting and style of the documentation for the
general-purpose compiler check macros:

  CHECK_C_COMPILER_FLAG
  CHECK_C_SOURCE_COMPILES
  CHECK_C_SOURCE_RUNS
  CHECK_CXX_COMPILER_FLAG
  CHECK_CXX_SOURCE_COMPILES
  CHECK_CXX_SOURCE_RUNS

This sytle is more consistent with CMake command documentation.
It also looks nicer in the generated documentation text files.
2009-09-17 15:28:51 -04:00
Alexander Neundorf 308e972412 The check for include dirs and builtin macros also works with the Intel compiler
Alex
2009-09-17 13:08:35 -04:00
Bill Hoffman ea282284d5 Fix for bug #9466. Change the implementation of OSX arch lists. If no ARCHs are specified by the user then no flags are set. We no longer use CMAKE_OSX_ARCHITECTURES_DEFAULT. 2009-09-17 11:53:02 -04:00
Alexander Neundorf 9d967ed47b Put compiler defined macros into eclipse project files
Now gcc is queried also for the builtin definitions, and they are then added
to the .cproject file. This should make the preprocessor highlighting in
eclipse work better (#9272)
Patch mostly from Miguel.

Alex
2009-09-16 14:37:21 -04:00
Bill Hoffman 72f524efc1 Bug #09476, add more search paths for jni. 2009-09-16 14:20:20 -04:00
Bill Hoffman 0b937cc4ae Fix for bug#9553, print a warning if pkg-config is not found. 2009-09-16 12:40:37 -04:00
Brad King b5e558e291 Fix XL C++ compiler flags on Linux
In Platform/Linux.cmake we add GNU flags as default for the platform
which breaks non-GNU compilers.  Later we should refactor these flag
files to put compiler-specific flags only in files loaded for each
compiler.  Until then this commit fixes the XL C++ compiler flags on
Linux by erasing the GNU flags.  See issue #9469.
2009-09-16 12:33:24 -04:00
James Bigler eaaf71d7b3 Initial version of FindCUDA script. Still needs documentation formatting. 2009-09-15 02:38:20 -04:00
Alexander Neundorf 72f32c2b98 fix #9152: find ZLIB quietly if PNG is searched QUIETLY
Alex
2009-09-14 15:53:07 -04:00
Bill Hoffman da29eb892b Change FindPythonLibs to use the standard _DIR instead of _PATH but stay backwards compatible 2009-09-14 09:34:57 -04:00
Alexander Neundorf cde1005442 major improvement of FindRuby.cmake
-now supports specifying minimum required version
-now supports ruby 1.8 and 1.9
-uses find_package_handle_standard_args() now
-fix #6212 and using a lot of ideas from the file attached there

Alex
2009-09-12 06:25:58 -04:00
Alexander Neundorf ea46c6e8a9 use HINTS instead of PATHS and also look for libruby-static.a (which is built by default)
Alex
2009-09-12 04:38:11 -04:00
Alexander Neundorf c6a10370bb Don't pass *.S files to the assembler, they must go through gcc, because they must be preprocessed
Alex
2009-09-12 02:15:30 -04:00
Brad King 4debb7ac69 Bias Fortran compiler search with C/C++ compilers
When CMAKE_Fortran_COMPILER and ENV{FC} are not defined CMake searches
for an available Fortran compiler.  This commit teaches the search code
to look for compiler executables next to the C and C++ compilers if they
are already found.  Furthermore, we bias the compiler executable name
preference order based on the vendor of the C and C++ compilers, which
increases the chance of finding a compatible compiler by default.
2009-09-09 16:39:47 -04:00
David Cole 6149e8f7e8 Missed another CMAKE_CFG_INTDIR reference in the previously previous commit. 2009-09-08 17:28:49 -04:00
David Cole 883338584f Missed a CMAKE_CFG_INTDIR reference in the previous commit. 2009-09-08 16:11:19 -04:00
Brad King fd47a2ae96 Drop old CMake "build settings" export/import
The CMakeExportBuildSettings and CMakeImportBuildSettings modules used
to export compiler paths and flags from one project and import them into
another.  The import process would force the settings on the including
project.

Forcing settings helped long ago when compiler ABIs changed frequently
but is now just a nuisance.  We've deemed the behavior harmful so this
commit simply removes it.  The modules and macros now error out if
included or called from a project that requires CMake 2.8 or higher.
2009-09-08 15:55:41 -04:00
David Cole 002ae925c3 Use more verbose/descriptive names for the "public API" functions in the ExternalProject.cmake module. Follow the cmake function naming convention, using a ModuleFileName_ prefix. Locate stamp files under a CMAKE_CFG_INTDIR subdir of the stamp dir so that debug and release builds have separate stamp files for Visual Studio builds. If no CMAKE_GENERATOR argument is given to ExternalProject_Add, default to using the parent project's cmake generator. 2009-09-08 15:37:15 -04:00
David Cole b71332914f Oops. Close strings with double quotes. Where they're supposed to be. 2009-09-04 18:19:06 -04:00
David Cole 5655ac46f0 Add MPICH2 and Microsoft HPC paths, add paths to find mpiexec. Now it works better automatically on Windows. Thanks to Dave Partyka for developing the patch. 2009-09-04 18:02:05 -04:00
Ken Martin f686dbecb6 some white space fixes for the book 2009-09-03 15:29:29 -04:00
David Cole 5624be360e Add test step to ExternalProject builds. Rename SVN_TAG to SVN_REVISION since it is a more accurate name. 2009-09-03 12:11:14 -04:00
Zach Mullen 69fd641adb Fixed ctest output where max test index is not the same width as the total number of tests. Also some preliminary changes for batching ctest jobs 2009-09-02 10:08:40 -04:00
Bill Hoffman 8710cc6422 Add support for embeded manifests for Intel C/C++/Fortran compilers 2009-09-01 16:33:51 -04:00
Bill Hoffman 76d059e3fb Add a module to determine if the intel linker supports manifest creation 2009-09-01 16:23:07 -04:00
Clinton Stimpson d6e8ffa927 use -o flag instead of > for qdbuscpp2xml 2009-09-01 15:21:06 -04:00
Bill Hoffman e9a170b108 Move /MANIFEST flag into -E vs_link. This is so it can be used by the intel compilers without having to specifiy it in the intel compiler files 2009-09-01 14:33:26 -04:00
Brad King 2eca4dd2d1 Use Intel for Linux flags only on Linux
The commit "Split Intel compiler information files" moved some Linux
specific flags into the platform-independent Intel compiler info files.
This moves them back.
2009-09-01 13:55:13 -04:00
Brad King dc78838737 Fix FortranCInterface_VERIFY for non-C++ case
The verification program entry point (main) is defined in a C source
file, so the C compiler should be used to link when only Fortran and C
are involved.  The C++ compiler should still be used when the CXX option
is enabled.
2009-09-01 13:03:12 -04:00
Brad King 78160cee6e Make FortranCInterface_VERIFY verbose on failure
We enable verbose build output in the try_compile of the simple project.
This makes valuable information available in the case of failure.
2009-09-01 08:52:43 -04:00