Commit Graph

2106 Commits

Author SHA1 Message Date
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
Will Dicharry ea34662053 Fixed link order dependence in FindHDF5 module for static link. 2009-08-31 18:18:34 -04:00
Will Dicharry 71ff183b5b In FindHDF5, added C library names to CXX search libraries. 2009-08-31 10:32:08 -04:00
David Cole 1171bcfc69 Add missing argument to _ep_write_downloadfile_script. 2009-08-26 06:52:43 -04:00
Will Dicharry c9686f62af Fixed HDF5 Find module error that caused no list to be passed into remove duplicates when HDF5 is not found. 2009-08-24 13:24:57 -04:00
Will Dicharry e6734068ef Add HDF5 find module and select_library_configurations module. 2009-08-24 12:04:35 -04:00
Brad King a9be85da2e Create FortranCInterface_VERIFY function
This function builds a simple test project using a combination of
Fortran and C (and optionally C++) to verify that the compilers are
compatible.  The idea is to help projects report very early to users
that the compilers specified cannot mix languages.
2009-08-24 08:49:35 -04:00
Brad King 14f7a043e3 Teach FortranCInterface to load outside results
We split the main detection logic into a Detect.cmake support module and
load it only when detection results are not already available.  This
allows results computed by the main project to be used in try-compile
projects without recomputing them.  The call to try_compile() need only
to pass FortranCInterface_BINARY_DIR through the CMAKE_FLAGS option.
2009-08-24 08:49:07 -04:00
Brad King 9ee0f9801a Split SunPro compiler information files
This moves platform-independent SunPro compiler flags into separate
"Compiler/SunPro-<lang>.cmake" modules.  Platform-specific flags are
left untouched.
2009-08-21 10:32:26 -04:00
Brad King 2ce6a7d0fb Split Intel compiler information files
This moves platform-independent Intel compiler flags into separate
"Compiler/Intel-<lang>.cmake" modules.  Platform-specific flags are
left untouched.
2009-08-21 09:54:42 -04:00
Brad King f64f9940af Teach FortranCInterface to verify languages
This module requires both C and Fortran to be enabled, so error-out if
they are not.
2009-08-20 16:21:53 -04:00
Philip Lowman 4bf4cbd8a2 Add Boost 1.39 & 1.40. Move ${Boost_INCLUDE_DIR}/lib to front of library search. 2009-08-19 22:28:46 -04:00
David Cole 0470a0c1ad Remove DownloadFile.cmake and UntarFile.cmake from the Modules directory. Put functionality directly into ExternalProject.cmake itself so that these modules do not end up in the upcoming release of CMake. 2009-08-19 12:19:12 -04:00
Philip Lowman 232b14f488 Find module for the Bullet physics engine 2009-08-16 23:07:15 -04:00
Philip Lowman c577608958 A find module for the Google C++ Testing Framework 2009-08-16 22:12:04 -04:00
Philip Lowman dac3903793 Checking in the FindFLEX.cmake & FindBISON.cmake attached to Issue #4018 after some minor improvements
* Improved examples
* Switched to FindPackageHandleStandardArgs
* Cleaned up indentation
* Sanitized else()/endif() blocks
2009-08-13 00:11:23 -04:00
Philip Lowman 5905f8f6c0 Fixes Issue #8994 2009-08-12 22:40:56 -04:00
Philip Lowman 1cde761faf Find module for GnuTLS, the GNU Transport Layer Security library (Issue #9228) 2009-08-12 22:25:31 -04:00
Philip Lowman fe18d13f79 Improved error output and documentation
* Fixed errant output when version number not found
* Improved error output when REQUIRED is passed
* Improved docs and example
2009-08-12 21:58:14 -04:00
Brad King 45313dc943 Quote the target name for Borland tlib tool
The Borland librarian tool "tlib" requires that the output target name
be quoted if it contains the character '-' (and perhaps a few others).
This commit restores the use of the TARGET_QUOTED rule variable
replacement for this purpose.  Otherwise no static library can have a
'-' in its name.

This problem was exposed by the 'Testing' test when it builds the
pcStatic library with the '-dbg' suffix.
2009-08-12 09:09:41 -04:00
Brad King 115ecc5750 Teach compiler id about VisualAge -> XL rebranding
IBM rebranded its VisualAge compiler to XL starting at version 8.0.  We
use the compiler id "XL" for newer versions and "VisualAge" for older
versions.  We now also recognize the "z/OS" compiler, which is distinct
from XL.
2009-08-07 10:13:07 -04:00
Brad King 34c6588b6e Move flag to Compiler/VisualAge-Fortran module
The CMAKE_Fortran_DEFINE_FLAG value applies to the IBM Fortran compilers
on all platforms.  This moves the setting to the platform-independent
compiler information file.
2009-08-07 10:12:34 -04:00
Brad King ee7231c03f Use NetBSD to initialize OpenBSD configuration
We teach Modules/Platform/OpenBSD.cmake to load NetBSD first since the
platforms are so similar.  This enables RPATH support on OpenBSD.
2009-08-07 09:56:20 -04:00
Brad King f33bcd6c50 Teach FortranCInterface about g77 mangling
The old GNU g77 Fortran compiler uses the suffix '__' for symbols
containing an underscore in their name.
2009-08-06 07:53:41 -04:00
Brad King 8dd02cb78d Sort FortranCInterface global mangling symbols
This just cleans up the list ordering so more entries can be added while
keeping everything organized.
2009-08-06 07:53:32 -04:00
Brad King edcddb522c Cleanup FortranCInterface for PGI and GCC 4.2
This documents the purpose of the extra my_module_.c and mymodule.c
source files, and sorts the symbols.
2009-08-05 17:07:36 -04:00
Bill Hoffman 71287734a9 Teach FortranC interface for Intel, PGI, and gcc 4.2 2009-08-05 16:55:57 -04:00
David Cole 6e54b18b5d Remove AddExternalProject.cmake. ExternalProject.cmake supercedes/replaces it. 2009-08-05 15:39:41 -04:00
David Cole fe0b121da9 Overhaul GetPrerequisites and BundleUtilities: make fixup_bundle do something useful on Windows and Linux.
Formerly, fixup_bundle was useful only on the Mac for making standalone bundle applications that could be drag-n-drop moved to anyplace in the file system. fixup_bundle is not just for the Mac any more. It will now analyze executable files on Windows and Linux, too, and copy necessary non-system dlls to the same folder that the executable is in. This should work with dlls that you build as part of your build and also with 3rd-party dlls as long as you give fixup_bundle the right list of directories to search for those dlls. Many thanks to Clinton Stimpson for his help in ironing out the details involved in making this work.
2009-08-05 14:59:14 -04:00
Brad King 80f0201b37 Rewrite FortranCInterface module
This is a new FortranCInterface.cmake module to replace the previous
prototype.  All module support files lie in a FortranCInterface
directory next to it.

This module uses a new approach to detect Fortran symbol mangling.  We
build a single test project which defines symbols in a Fortran library
(one per object-file) and calls them from a Fortran executable.  The
executable links to a C library which defines symbols encoding all known
manglings (one per object-file).  The C library falls back to the
Fortran library for symbols it cannot provide.  Therefore the executable
will always link, but prefers the C-implemented symbols when they match.
These symbols store string literals of the form INFO:symbol[<name>] so
we can parse them out of the executable.

This module also provides a simpler interface.  It always detects the
mangling as soon as it is included.  A single macro is provided to
generate mangling macros and optionally pre-mangled symbols.
2009-08-05 13:40:29 -04:00
Brad King 6843448379 Pass Fortran90 test result to try-compile
This stores CMAKE_Fortran_COMPILER_SUPPORTS_F90 in the Fortran compiler
information file CMakeFiles/CMakeFortranCompiler.cmake instead of in
CMakeCache.txt.  This file makes the result available to try-compile
projects.
2009-07-30 13:46:51 -04:00
Brad King fcab87c9f8 Do not always propagate linker language preference
The commit "Consider link dependencies for link language" taught CMake
to propagate linker language preference from languages compiled into
libraries linked by a target.  It turns out this should only be done for
some languages, such as C++, because normally the language of the
program entry point (main) should be used.

We introduce variable CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES to tell
CMake whether a language should propagate its linker preference across
targets.  Currently it is true only for C++.
2009-07-30 10:59:37 -04:00
Brad King 35f36727c5 Set CMAKE_<LANG>_VERBOSE_FLAG variables for PGI
We set the variables to contain "-v", the verbose front-end output
option for PGI compilers.  This enables detection of implicit link
libraries and directories for these compilers.
2009-07-29 16:38:06 -04:00
Brad King 0ea43ee128 Set CMAKE_<LANG>_VERBOSE_FLAG variables for Intel
We set the variables to contain "-v", the verbose front-end output
option for Intel compilers.  This enables detection of implicit link
libraries and directories for these compilers.
2009-07-29 16:07:27 -04:00
Brad King edad475e26 Recognize linker commands without paths
This teaches the implicit link line parsing code to recognize link lines
that do not have a full path to the linker executable.  At least one
version of the Intel compiler on Linux invokes the linker as just "ld"
instead of "/usr/bin/ld".
2009-07-29 16:07:19 -04:00
Brad King 836447663e BUG: Parse implicit link editor -z*extract options
The Sun Fortran compiler passes -zallextract and -zdefaultextract to the
linker so that all objects from one of its archives are included in the
link.  This teaches the implicit options parser to recognize the flags.
We need to pass them explicitly on C++ link lines when Fortran code is
linked.
2009-07-28 08:36:11 -04:00
Brad King 071ce33ec9 ENH: Install all Modules and Templates
This removes the file-wise installation rules for Modules and Templates
and instead installs the whole directories.  This approach is much less
error-prone.  The old approach was left from before CMake had the
install(DIRECTORY) command.
2009-07-24 13:17:41 -04:00
Brad King 31678a3c27 BUG: Install new fortran compiler id source.
The extension of the id source file was changed from .F90 to .F so this
fixes the install rule.
2009-07-24 12:55:42 -04:00
Brad King efaf335bf2 BUG: Skip implicit link information on Xcode
Xcode adds extra link directories that point at the build tree, so
detection of implicit link directories is not reliable.  Since Fortran
is not supported in Xcode we will not need implicit link information yet
anyway.
2009-07-23 16:19:29 -04:00
Brad King 07ea19ad1f ENH: Implicit link info for C, CXX, and Fortran
This teaches CMake to detect implicit link information for C, C++, and
Fortran compilers.  We detect the implicit linker search directories and
implicit linker options for UNIX-like environments using verbose output
from compiler front-ends.  We store results in new variables called

  CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES
  CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES

The implicit libraries can contain linker flags as well as library
names.
2009-07-23 10:07:25 -04:00
Brad King 797e49a1cc ENH: Load platform-independent per-compiler files
This teaches the language configuration modules to load per-compiler
information for each language using the compiler id but no system name.
They look for modules named "Compiler/<id>-<lang>.cmake".  Such modules
may specify compiler flags that do not depend on the platform.
2009-07-23 10:06:31 -04:00