The AMD64 ABI document http://www.x86-64.org/documentation/abi.pdf
does specify that 64bits binary libraries should end up in <prefix>/lib64
and 32bits ones in <prefix>/lib. All but debian based distros do so,
and some like OpenSUSE even enforce the rule when packaging with RPM
and refuse to build the RPM if this is not the case.
After some discussion (see the bug notes) we cannot do that behind
the scene and the current fix supposes that the user shall use
the CMAKE_INSTALL_LIBDIR variables content in its INSTALL rules if
he wants to put the lib in the right place. CMAKE_INSTALL_LIBDIR
shall have the appropriate value depending on the Linux distribution
found and 32/64bitness of the host.
The cross-compiling case (even 32bits compile on a 64bits host)
is not handled.
The Cray Fortran compiler started using module init symbols in version 7.3.2.
Starting in commit 71287734 (Teach FortranC interface for Intel, PGI, and gcc
4.2, 2009-08-05) we provide C versions of the module init symbols so that the
detection executable can link when the C versions of the module-mangled symbols
are picked up.
If no C module-mangled symbol matches then we cannot let the C module init
symbol appear because it will be duplicated by the Fortran copy that provides
the module-mangled symbol. This was first handled for the PathScale compiler
in commit 21faaa5d (FortranCInterface: Fix PathScale detection, 2010-01-22) and
commit 46858720 (FortranCInterface: Fix PathScale detection again, 2010-02-16).
Handle it now for the Cray compiler too.
86cb17b Pass include directories with response files to GNU on Windows
9a0b9bc Optionally pass include directories with response files
6e8a67f Generate target-wide flags before individual build rules
d099546 Factor old-style -D flags out from -I flag generation
Also, comment out all "debugging" calls to message() that helped
us interpret the output on other platforms when running on the
dashboard clients.
Using ERROR_QUIET avoids unnecessary stderr output while calling
external tools to determine the processor count. If there's an
error parsing the output, we set the count to 0 anyhow.
Also, the test will fail on a CMake dashboard run if the count
comes back equal to 0.
Now that the code is "done"-ish, remove the debugging output.
Expect no output on stdout or stderr when calling the
ProcessorCount function from now on.
This check if the function exists and the prototype we want to use is
correct. There are still functions which have different prototypes on
different UNIX systems.
The GNU 4.x toolchain on MinGW (and therefore MSYS) allows compiler
options to be passed via response files. Use this to pass include
directory -I options. This allows the include file search path to be
very long despite shell and mingw32-make command line length limits.
Adjust whitespace to make the output of "--help-module FindMPI" look
good. Also separate the comment containing the copyright and license
notice so it does not appear in the documentation.
Adds support for:
- MPI_<lang>_COMPILER and other useful variables for C, CXX, Fortran
- Better compiler interrogation (handles mvapich)
- Supports specifying an MPI compiler name directly on the command line
without and absolute path, e.g.: cmake -D MPI_CXX_COMPILER=mpixlC
- Better compiler name searching tries to match MPI compiler to regular
CMAKE_<lang>_COMPILER_ID, if it's available.
Gets rid of:
- MPI_LIBRARY, MPI_EXTRA_LIBRARY cache variables. These and other old
vars are still exported for backward compatibility, but they're not
cached.
Also, add message output (temporarily) for gathering data
on all the dashboard machines. After the test runs on the
overnight dashboards tonight, I'll comment out the message
output and commit/push again.
Credit goes to David Cole ( http://www.kitware.com/blog/home/post/63 ).
Also add a script-based test of the new module.
Signed-off-by: Michael Wild <themiwi@users.sourceforge.net>
ade04de Remove debbuging typo
a201028 CPack try to please SUSE 64 bits and install lib in lib64 and not lib.
7ebbcf1 CPackRPM non matching ENDIF
0e07b42 CPackRPM even more trace in debug mode or in case of failure
564b731 CPackRPM add more trace output in order to help failing diagnostics
b3ce420 Do not bother enabling C++ in Assembler test
80f6a34 Teach Assembler test to generate main.s at build time
1dafa74 Fix Assembler test to parse C flags string before using
4139a73 -only enable the asm test for the Intel compiler if we are under UNIX
1f6c6b1 -use CMAKE_C_FLAGS when generating the assembler file
d0f71e2 Add ASM platform information for HP compiler on HP
bd580be Merge branch 'hp-compiler-info' into ReworkedAsmSupport
a0bab7a Add ASM platform information for XL compiler on AIX
c03b610 Merge branch 'aix-xl-platform-info' into ReworkedAsmSupport
c623008 Initialize ASM rpath flags for executables with those for shared libs
17c658f Add support for the Intel compiler used for ASM under Windows
4258b24 Add more regex for gcc, always print the ASM compiler ID
9071b8b Add temporary debug output for compiler ID detection for ASM
48f7199 It's ELSEIF(), not ELSIF()
d103c75 Fix bad comparison in the detect assembler-code
20fe0be Only try assembler support for Makefile-based generators
8614470 Use a regexp instead a lot of ORs for checking the compiler ID
cf88092 The Assembler test now tests ASM for GNU, Intel, HP, XL and SunPro
66614a8 Add assemble- and preprocess commands for HP
78f7c59 Fix the default CMAKE_ASM_COMPILE_OBJECT, make XL-ASM use it
7456461 Change the default rules so they fit better to the new ASM handling
5542d58 Set the HP asm file suffix
f745220 Add support for ASm for the HP compiler.
00735d4 Add suport for ASM for the IBM XL compiler
d3e9e8a Add support for ASM for the SunPro compiler
64e66eb Actually use CMAKE_ASM_COMPILER for asm, instead of CMAKE_C_COMPILER
38f92bf Add ASM support for the Intel compiler
4b40d42 Rework the way assembler is handled, use the C/CXX compiler by default
Move HP flags out of Platform/HP-UX.cmake into platform-specific
compiler information files "Platform/HP-UX-HP-<lang>.cmake". Factor
common values into "Platform/HP-UX-HP.cmake" and load it from the
per-language files.
Since the flags for executables are almost always the same as those for
shared libraries each language information file just uses the latter for
the former by default. This reduces duplication in the compiler and
platform flag information files.
Move RPATH flags out of Platform/AIX.cmake into platform-specific
compiler information files Platform/AIX-XL and Platform/AIX-GNU.
The flags need to be set for each compiler of each language.
CMAKE_ASM_COMPILE_OBJECT is now so that it fits for GNU, Intel, HP and Sun
ASM_ATT had to be adjusted. Also adjusted the default
CMAKE_ASM_LINK_EXECUTABLE
Alex
Commit 6a61a8a5 (Honor module .def files with MinGW tools, 2011-02-21)
set CMAKE_LINK_DEF_FILE_FLAG to "-Wl," to enable passing .def files to
the linker on MinGW. However, older GNU tools in the MSYS shell do not
know how to translate "-Wl,/c/..." to "c:/..." and complain that the
file does not exist. Instead set the flag to just "" which tells CMake
it can pass the file through the front-end with no special flag.
7a1027a When checking find_package() components, special case qtmain.
4c1c358 FindQt4: Include builtin FindPackageHandleStandardArgs directly
43cb9b8 Change to use fphsa to check required variables and version.
Since commit 024d05ad (Fix use of module .def files for MS tools,
2009-09-29) module .def files work for any platform that sets
CMAKE_LINK_DEF_FILE_FLAG correctly. Set it in the Windows-GNU platform
information file to enable support with MinGW tools. Also enable the
test added by commit 0db2c850 (Test use of module .def files for MS
tools, 2009-09-29) for MinGW and MSYS generators.
When initializing CMAKE_(EXE|SHARED|MODULE)_LINKER_FLAGS from LDFLAGS
and CMAKE_(EXE|SHARED|MODULE)_LINKER_FLAGS_INIT quote the whole string
in case both are set.
Reported-by: Daniel R. Gomez <gomez@teragram.com>
Clients may define CTEST_TEST_TARGET_ALIAS in a project's
initial cache to get a target of another name that executes
the same underlying command as "make test"
When running
$ mpif77 -c example.f -o example.f.o
mpif77 recognizes -o and produces example.f.o, but when running
$ mpif77 -o example.f.o -c example.f
the -o option is ignored and the object file is example.o. Performing
the same experiment on the underlying compiler tool or with the mpicc
and mpiCC wrappers does not exhibit this behavior, so the issue appears
to be specific to mpif77.
Reported-by: Zhen Wang <zwang26@emory.edu>
This commit changes the way how the assembler support works in cmake.
The language "ASM" now always uses the C/Cxx compiler instead
of the assembler directly. This fixes#8392, assembler files are
not preprocessed.
If one wants to use the assembler directly, the specific
assembler "dialect" has to be enabled. I.e. to get as/gas,
you have to use now ASM-ATT, the same way for ASM_MASM and ASM_NASM.
Implemented this now for gcc.
SunStudio, IBM, HP and Intel still todo.
Alex
dd2f814 Merge branch 'dev/add_test-working-directory' into dev/strict-mode
949d32c Unwatch manual variables upon removal in cmake-gui
3939032 Unwatch manual variables upon removal in ccmake
8354413 Add method to unwatch a manual variable
8ed3c85 Give a better message for unused variables
729db48 Fix ArgumentExpansion test expected results
89c2544 Checking for a definition is a usage
5625dee Don't output to stderr in the GUI
ad25a96 Merge branch 'ImprovedDotSupport2' into dev/strict-mode
c128abe Merge branch 'AddCMAKE_CURRENT_LIST_DIR' into dev/strict-mode
9bcaff0 Merge branch 'cmake-guiRememberAdvancedCheckbox' into dev/strict-mode
544d0c3 Fix expected output for WarnUninitialized test
4e3bea4 Update expected messages to new format
8e8c9e4 Don't check at destruction for usage
668e005 Use cmake::IssueMessage for warnings
88cd4c1 Use 'CMake Warning' versus 'warning' for CDash
3c3b98d Initialize the class before setting warn flags
cf8b15a Ignore files under the CMakeFiles directory
fd50f06 Don't check for unused vars at configure time
447a04c Don't warn during configure when doing everything
b97ee21 Check for unused variables at the end of generate
c18c977 When checking for variables, specify a reason
3f1121f Use a long int since Line is a long as well
2507f93 Change the failure case string to 'Unexpected'
fe390a2 Add 'ArgumentExpansion' test
8dbb209 Wrong boolean value for CLI warnings
d4ee998 Hard-code the --no-warn-unused-cli flag
a267b99 Fix line lengths
82ed104 Flag that the directories have been set
5aa535b Add argument to arg parsing to not set directories
367e5c3 Revert "Revert "When calling CMake, set the args and the cache""
ab5d4e4 Revert "When calling CMake, set the args and the cache"
9b90040 When calling CMake, set the args and the cache
fe56002 Fix long lines for KWStyle
5d30cfc Set a watch on variables added through the gui
33c63b1 Add a method to put a watch for variables
535253f Initialize the warning variables earlier
cbb286c Fix the path detection to work for top-level
62be1f7 Initialize the usage stack earlier
c6e7fab Factor out the checks for unused variables
5e41ba8 When using the API, check for Add vs. Remove
dee1976 Fix typo in VariableUnusedViaUnset test
f231ce5 Remove old false positive avoidance code
a117e02 Revert "Add test for unused warnings at the end of scope"
2c82f2b Exempt CMAKE(CURRENT|PARENT)_LIST_FILE from usage
6d7d449 Ignore CLI warnings for ABI determination
7740a73 Only return local keys that are defined
bef3aee Use the API so that warnings can be tracked
05cb0f4 Check for unused variables in the dtor
91c4c99 Add test for unused warnings at the end of scope
ca90f67 Fix detection of unused variables when setting
f7438ca Add test for unused detection via setting it
995cfb0 Don't warn if the variable wasn't defined
aefc91d Add test for usage checks via unset
a8e97f8 Remove VarRemoved code since it's been superceded
59463ef Rework CheckVariableForUnused usage
f117423 Fix line lengths to be no more than 78
e49a935 Improve unused warning logic
e01e40c Mark ARGC, ARGV*, and ARGN as used
a17aff7 Ignore CMAKE_MATCH_* variables for usage
02a114d Add method to allow variables to be marked as used
a0b0d23 CMAKE_DO_TRY_COMPILE is no longer used
ae3eff3 Fix the path used for ignoring system warnings
056b441 Fix missing case for usage of a variable
980e048 Factor out checks for unused variables
83acb0a Remove now unused variables
3801463 Use built-ins for readability and maintainability
8b52015 Push the initialize and unused states when copying
439877f Be consistent with single and double quotes
4cf1706 Add documentation for check-system-vars
b74777f Fix the spelling of the flag for warn-unused-vars
b948120 Change logic of flag to turn off cli unused checks
f047a17 Add test for uninitialized variables
75bda38 Add tests for unused command line variables
300fc15 Fix detection of system files
d784e6a Run the unused variables check on the final pass
9efc057 VariableWatch is not available when bootstrapping
2e78224 Add a missing comma to the warning message
7499700 Add a flag to warn about system files
fff9f6d Rename flags again and use variablewatch for cli
786e269 Add warn-unused to the Qt interface
636e6c4 Default to marking things as used
4ff0340 Rename find-unused to warn-unused
d7999e9 Rename strict-mode to warn-uninitialized
e141bc9 Detect unused variables
d3e8eb5 Add flags to detect unused variables
f332e14 Complete strict-mode checks for uninitialized vars
52f9637 Add method to get the local scope variables
f794d58 Make --strict-mode option, and integrate with cmake-gui
48b5b85 Add a warning when variables are used uninitialized.
cd626ea For macros make sure the FilePath points to a valid pointer in the args.
The FindPackageHandleStandardArgs module was originally created outside
of CMake. It was added for CMake 2.6.0 by commit e118a627 (add a macro
FIND_PACKAGE_HANDLE_STANDARD_ARGS..., 2007-07-18). However, it also
proliferated into a number of other projects that at the time required
only CMake 2.4 and thus could not depend on CMake to provide the module.
CMake's own find modules started using the module in commit b5f656e0
(use the new FIND_PACKAGE_HANDLE_STANDARD_ARGS in some of the FindXXX
modules..., 2007-07-18).
Then commit d358cf5c (add 2nd, more powerful mode to
find_package_handle_standard_args, 2010-07-29) added a new feature to
the interface of the module that was fully optional and backward
compatible with all existing users of the module. Later commit 5f183caa
(FindZLIB: use the FPHSA version mode, 2010-08-04) and others shortly
thereafter started using the new interface in CMake's own find modules.
This change was also backward compatible because it was only an
implementation detail within each module.
Unforutnately these changes introduced a problem for projects that still
have an old copy of FindPackageHandleStandardArgs in CMAKE_MODULE_PATH.
When any such project uses one of CMake's builtin find modules the line
include(FindPackageHandleStandardArgs)
loads the copy from the project which does not have the new interface!
Then the including find module tries to use the new interface with the
old module and fails.
Whether this breakage can be considered a backward incompatible change
in CMake is debatable. The situation is analagous to copying a standard
library header from one version of a compiler into a project and then
observing problems when the next version of the compiler reports errors
in its other headers that depend on its new version of the original
header. Nevertheless it is a change to CMake that causes problems for
projects that worked with previous versions.
This problem was discovered during the 2.8.3 release candidate cycle.
It is an instance of a more general problem with projects that provide
their own versions of CMake modules when other CMake modules depend on
them. At the time we resolved this instance of the problem with commit
b0118402 (Use absolute path to FindPackageHandleStandardArgs.cmake
everywhere, 2010-09-28) for the 2.8.3 release.
In order to address the more general problem we introduced policy
CMP0017 in commit db44848f (Prefer files from CMAKE_ROOT when including
from CMAKE_ROOT, 2010-11-17). That change was followed by commit
ce28737c (Remove usage of CMAKE_CURRENT_LIST_DIR now that we have
CMP0017, 2010-12-20) which reverted the original workaround in favor of
using the policy. However, existing project releases do not set the
policy behavior to NEW and therefore still exhibit the problem.
We introduced in commit a364daf1 (Allow users to specify defaults for
unset policies, 2011-01-03) an option for users to build existing
projects by adding -DCMAKE_POLICY_DEFAULT_CMP0017=NEW to the command
line. Unfortunately this solution still does not allow such projects to
build out of the box, and there is no good way to suggest the use of the
new option.
The only remaining solution to keep existing projects that exhibit this
problem building is to restore the change originally made in commit
b0118402 (Use absolute path to FindPackageHandleStandardArgs.cmake
everywhere, 2010-09-28). This also avoids policy CMP0017 warnings for
this particular instance of the problem the policy addresses.
In commit 295b5b60 (Honor CMAKE_USER_MAKE_RULES_OVERRIDE in try_compile,
2010-06-29) we started passing the value of this variable when building
a try_compile project. If the variable contains a relative path it must
be treated with respect to the file where it is first used. Ensure that
the value is converted to a full path so that it is correctly referenced
in the try_compile projects.
The module header was being placed in the source tree before. Thanks to
Marcel Loose for the patch, this ensures the file is written to the
build tree.
The parent commit added a warning message whenever a required file
does not exist.
As it turns out, the "required" files never exist when built with
Visual Studio Express editions. Add a variable to suppress these
warning messages because only packagers or naive includers of
this file will care to see such warning messages.
We want to warn about this condition by default so that people who
are using InstallRequiredSystemLibraries without understanding it
fully will have a chance of understanding why it's not working in
the event of missing required files.
But we also want to give projects the ability to suppress this warning
(by "project's choice default") so that they can encourage users who
are restricted to using an Express edition to build their project.
Packagers should explicitly use...
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS=OFF
...when building releases. That way, their release build process will warn
them about any missing files, but only if their project CMakeLists files
use a construct similar to CMake's:
IF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
ENDIF()
Thanks to "J Decker" on the CMake mailing list for pointing out
that one of the MSVC10_CRT_DIR settings was using "VC90" instead
of "VC100".
After fixing that, I added the code to generate a CMake warning
if one of the files we think is "required" does not exist.
Then, with VS10, there were several other problems that the
warning revealed:
- MSVC10_REDIST_DIR needed more PATHS to be found correctly
- the 64-bit directory is named "x64" now, not "amd64" as in
previous VS versions
- manifest files no longer exist as separate files in the
redist subdirectories (they must be built-in as resources
to the dlls...?)
The check works for macros, functions, and variables, but not for types
or enumeration values. Clearly describe the behavior of the check with
respect to each symbol type.
ce28737 Remove usage of CMAKE_CURRENT_LIST_DIR now that we have CMP0017
7db8db5 Improve documentation and messages for the new CMP0017
db44848 Prefer files from CMAKE_ROOT when including from CMAKE_ROOT
1e69c6f Merge branch 'user-policy-defaults' into policy-CMP0017
65a0a2a Merge branch 'include-command-whitespace' into policy-CMP0017
Control the root directory of the default directory presented to
the end user of an NSIS installer by a CPack variable.
Previously, the value used in the NSIS script was $PROGRAMFILES,
which is equivalent to the "ProgramFiles" environment variable.
That default value is still the same, but now a project may
override the value by setting this new variable.
Introduced an additional variable, Python_ADDITIONAL_VERSIONS, to both
FindPythonLibs and FindPythonInterp. Changed FindPythonInterp to loop
over versions rather than hardcoding all versions (more like libs).
Commit aaa88d33 (Build large archives incrementally, 2008-08-04)
hard-coded rules to create static archives incrementally in each
language information file. Set each rule conditionally to allow
compiler and platform information files to override the language
default rules.
Inspired-by: Harald Pohl <pohl.h@eppendorf.de>
Unset VS_UNICODE_OUTPUT when executing a command whose output
is being logged to a file. Previously, running Microsoft tools
in sub-processes of Visual Studio would send their output to
the Visual Studio output pipe named by this environment variable.
Unsetting it forces the output back to the normal stdout and stderr
channels where cmake can intercept it and direct it to the
appropriate log files.
MUI_FINISHPAGE_RUN is frequently used with NSIS and provides a checkbox
on the finish page of an installer which specifies whether the specified
executable should be run when the installer exits. This commit adds support
for this setting in CPack.
NSIS installers default to assuming the executables exist in a
directory named "bin" under the installation directory. As this
isn't usual for Windows programs, the addition of this variable
allows the customization of this directory and links still to be
created correctly.
Add support to InstallRequiredSystemLibraries to only install
debug libraries when both debug and release versions are available.
This is as if you are building a debug package then only the debug
versions are needed but not the release.
InstallRequiredSystemLibraries currently defaults to installing to
bin on WIN32 and lib otherwise. This patch allows you to configure
this by using the variable CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION.
It also switches the logic to use a single INSTALL(PROGRAMS) command
rather than two deprecated uses of the INSTALL_PROGRAMS command.
In InstallRequiredSystemLibraries the documentation details the
variable CMAKE_SKIP_INSTALL_RULES to skip installation. This
actually doesn't do anything, the variable required is named
CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP. This commit amends the
documentation to point to the correct variable.
971692c Build enable_language command during bootstrap
960ace1 Add testing for windows resources for mingw/msys/cygwin and remove for watcom.
060d6e8 Add support for windres to cygwin.
b2f308c Add support for windows resources with mingw/msys.
This puts the new search behaviour for included files in action, i.e.
now when a file from Modules/ include()s another file, it also gets the
one from Modules/ included, i.e. the one it expects.
Alex
Since commit 70c2dc8a (Make compiler id detection more robust,
2008-03-10) we store compiler identification strings in test binaries
using the form
char* info = "info";
Use the const-correct
char const* info = "info";
form instead. This allows the C++ compiler identification to work with
"-Werror -Wall" or equivalent flags if the compiler would warn about
const-to-non-const conversion.
The TI DSP compiler predefines "__TI_COMPILER_VERSION__". Use this to
identify the C and C++ compilers. For assembler language the C compiler
executable is used:
$ cl6x -h
TMS320C6x C/C++ Compiler v6.1.11
Tools Copyright (c) 1996-2009 Texas Instruments Incorporated
Use this command-line option and output to recognize the assembler.
The Mac linker defines flag -headerpad_max_install_names but not all
front-ends recognize the flag and pass it through (many did in the past,
such as the Apple port of GCC). Use the -Wl, option prefix to tell
front-ends to pass it through without trying to interpret it.
One of Cygwin's goals is to build projects using the POSIX API with no
Windows awareness. Many CMake-built projects have been written to test
for UNIX and WIN32 but not CYGWIN. The preferred behavior under Cygwin
in such projects is to take the UNIX path but not the WIN32 path.
Unfortunately this change is BACKWARDS INCOMPATIBLE for Cygwin-aware
CMake projects! Some projects that previously built under Cygwin and
are Cygwin-aware when they test for WIN32 may now behave differently.
Eventually these projects will need to be updated, but to help users
build them in the meantime we print a warning about the change in
behavior. Furthermore, one may set CMAKE_LEGACY_CYGWIN_WIN32 to request
old behavior during the transition.
Normally we avoid backwards incompatible changes, but we make an
exception in this case for a few reasons:
(1) This behavior is preferred by Cygwin's design goals.
(2) A warning provides a clear path forward for everyone who may see
incompatible behavior, and CMAKE_LEGACY_CYGWIN_WIN32 provides a
compatibility option. The warning and compatibility option both
disappear when the minimum required version of CMake in a project is
sufficiently new, so this issue will simply go away over time as
projects are updated to account for the change.
(3) The fixes required to update projects are fairly insignificant.
Furthermore, the Cygwin distribution has no releases itself so project
versions that predate said fixes tend to be difficult to build anyway.
(4) This change enables many CMake-built projects that did not
previously build under Cygwin to work out-of-the-box. From bug #10122:
"I have built over 120 different source packages with (my patched)
CMake, including most of KDE4, and have found that NOT defining
WIN32 on Cygwin is much more accurate." -- Yaakov Selkowitz
A fully compatible change would require patches on top of these project
releases for Cygwin even though they otherwise need not be aware of it.
(5) Yaakov has been maintaining a fork of CMake with this change for the
Cygwin Ports distribution. It works well in practice. By accepting the
change in upstream CMake we avoid confusion between the versions.
CMake itself builds without WIN32 defined on Cygwin. Simply disable
CMAKE_LEGACY_CYGWIN_WIN32 explicitly in our own CMakeLists.txt file.
09d1c10 FortranCInterface: Recognize NAG Fortran module symbols
af2ad90 Add NAG Fortran compiler information files
24cc3d4 Recognize the NAG Fortran compiler
83892c4 Allow Fortran platform files to set empty values
fe3f878 Detect object files in implicit link information
Use "int main(void)" instead of just "int main()" so that compiling with
"gcc -Werror=strict-prototypes" works. Test this check using the flags
"-Werror -Wstrict-prototypes" to work with old GCC versions.
Since commit aff31479 (Modernize GNU compiler info on Windows,
2009-12-02) the file Modules/Platform/Windows-g++.cmake has been unused.
It just includes the non-existent Modules/Platform/Windows-gcc.cmake so
remove it outright.
This moves Intel compiler info on Windows into new-style modules
Platform/Windows-Intel-<lang>.cmake
using language-independent helper module
Platform/Windows-Intel.cmake
to define macros consolidating the information.
Commit 4430bccc (Change the way 32/64 bit compiles are detected with
MSVC and intel, 2009-11-19) added detection of the target processor to C
and CXX language builds with MS and Intel tools. Do the same for Intel
Fortran for Windows (ifort). Use /machine:<arch> to link executables.
3bc828d Fixed bug where last entry would be lost.
b316087 Escape file write expansion, and build up lists.
68cd3fe Added CMAKE_CACHE_ARGS to ExternalProject.
27ee50a Add ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT as a ADVANCED cache variable (#9631)
50d21d4 Add cache var CMAKE_ECLIPSE_MAKE_ARGUMENTS when using the Eclipse generator
This variable can be set to command line arguments which will be passed
to make when eclipse invokes make, e.g. you can enter "-j8" to get
8 parallel builds (#9930)
Alex
Escaped the @var@ in the file writes - this was being expanded at file
write and so not causing a reconfigure at the right time. I also took
care of build up lists of lists in the variables, especially important
for things like MPI_EXTRA_LIBRARY. Added some error checking, and use
the tmp_dir for initial cache file.
On Windows the limit for command line arguments is 8192 characters, and
this was limiting longer paths with some of our more nested projects
such as Library. Placing the -D arguments into CMAKE_CACHE_ARGS will
write out an initial cache file, that will be passed to CMake with a -C
argument as the initial cache.
By forcing the cache variables we preserve the existing behavior with
-D, to change the values of cache variables in our inner projects.
On Linux the NAG Fortran compiler uses gcc under the hood to link. Use
"-Wl,-v" to pass "-v" to the underlying gcc compiler to get verbose link
output. Detect the NAG Fortran directory (using -dryrun) and then honor
object files in the directory referenced in the implicit link line.
Pass real linker options with "-Wl,-Xlinker,". The -Wl, gets through
the NAG front-end and the -Xlinker gets through the gcc front-end.
The Numerical Algorithms Group (NAG) Fortran compiler does not document
a preprocessor macro to identify it. Check for identifying output using
the -V option.
Teach CMakeFortranInformation to use default flags only for variables
that have not been set at all, rather then not set or empty. This will
allow platform or compiler-specific information files to set empty
values without getting the defaults.
The NAG Fortran compiler implicitly passes object files by full path to
the linker. Teach CMakeParseImplicitLinkInfo to parse object files that
match some tool-specific regular expression.
FindTCL.cmake switched variables in the FIND_LIBRARY invocation. The
FIND_LIBRARY() statement for TCL used the TK variables and vice versa.
This patch reverses that into the right usage.
Closes debian issue 600245.
Also, improve the documentation of the fixup_bundle and fixup_bundle_item
functions to clarify that plugin type "libs" need to be copied into
the bundle *before* calling fixup_bundle.
Commit e93a4b4d34 changed the way that
the libs parameter to fixup_bundle is interpreted. Before the commit,
the libs were copied into the bundle first and then fixed up. After
the commit, the copy was skipped, assuming the libs were in the bundle
in the first place, and then the fixups occurred as before.
However, before the commit, it was possible to name a lib from outside
the bundle, and have it copied in and then fixed up. Its resolved
embedded name was always inside the bundle before. After, its resolved
embedded name was just the same as its resolved name, which is in its
original location, and not necessarily inside the bundle.
This manifested itself as a problem with the ParaView call to
fixup_bundle and its many plugins. Previously, ParaView had simply
passed in the list of plugin file names as they existed in the build
tree, and left the copying into the bundle up to the fixup_bundle
function. When built with CMake 2.8.3 (the first version to contain
the above named commit) the fixup_bundle call would inadventently
fixup libraries in the build tree, not libraries that were in the
bundle. Furthermore, the plugins would not be in the final bundle.
This points out the fact that the fix for the bugs made by the above
commit was a backwards-incompatible change in behavior.
This commit makes it an error to try to fixup an item that is not
already inside the bundle to make the change in behavior apparent
to folks who were depending on the prior copy-in behavior: now,
they should get an error, and hopefully, reading the new and
improved documentation, should be able to resolve it in their
projects by adding code to install or copy in such libraries prior
to calling fixup_bundle.
Whew.
e0b6016 Some more fixes for nasm support, from Etienne (#10069)
d25c2eb Use CMAKE_ASM_NASM_FLAGS for nasm instead of FLAGS
e614e9b Add support for yasm, a nasm compatible assembler
79dd9be We already have 2010, fix copyright year.
ffeca06 Add missing copyright headers
7b337ac Improve misleading comments.
e1fc9b9 Add support for nasm assembler, patch by Peter Collingbourne (see #10069)
Use the Config mode of find_package to search for ITKConfig. This makes
FindITK a thin-wrapper around a standard find_package, bringing benefits
like searching lib64 paths when appropriate. This does for FindITK what
commit 2c1a01dc (Modernize FindVTK module, 2009-10-07) did for FindVTK.
The Mac linker defines -headerpad_max_install_names and the GCC
front-end passes this flag through. The PGI compiler does not know
about this flag, so we must use -Wl,-headerpad_max_install_names to pass
it to the linker instead.
CMakeDetermineASMCompiler.cmake relied on that somebody else (usually
during enabling C or CXX) already included that file, and broke if that
was not the case.
Thanks to Louis for the patch
Alex
The Cray Fortran compiler needs "-em" to enable module output and also
"-J." to place the .mod files in the current working directory (instead
of next to the .o file).
Previously FindPerlLibs did not work with the Mac stock Perl because it
includes patches. From "perl -V":
Locally applied patches:
/Library/Perl/Updates/<version> comes before system perl directories
installprivlib and installarchlib points to the Updates directory
Adjust paths accordingly.
48e80eb Fixes to GetPrerequisites for cygwin
bee4802 Append the gp_tool path to the system PATH using native slashes.
8e550ba Remove unecessary TO_CMAKE_PATH for gp_cmd_dir.
1684198 Switch to CMAKE_PATH when doing PATH comparisons on Windows.
be94c49 Fixed appending PATH to dumpbin tool from growing without bounds.
Fix IF(WIN32) guards check for cygwin. Fix checking if the depenency is in a system location to use cygwin style paths on cygwin. Also change GetPrerequisites to switch gp_tool to tools that are very unlikely to be found, ie. dumpbin on Apple and otool on Windows/Unix.
Users PATH may contain elements that end with backslash. This will escape the semicolon when iterating resulting in mismatches.
Fix indentation.
Fix whitespace
This fixes bugs #0011355 and 0008342.
The merged patch is a contribution from Michael Lasmanis and Petri Hodju
with some extra documentation added by the merger.
IF(... MATCHES ...) used for comparing directories chokes especially in the case of C:\Program Files (x86)\<blah> because of regex pattern matching. Switched this to use STREQUAL in a loop instead.
Fixed parallel build for projects using generators that have the
CMAKE_EXTRA_GENERATOR as well as CMAKE_GENERATOR. Thanks to Bill Hoffman
for helping me to track this one down, I missed parallel builds.
There is no need to introduce this extra variable as FindBoost
can simply rely on if Boost_USE_STATIC_RUNTIME is defined
or not to disable the old searching behavior for static runtime
libraries on WIN32.
On a Win32 system with a German version of SilkSVN I couldn't run CMake
again on the working copy as the cache is displayed as corrupted. The
cause is that the regular expression to find the version number will not
match and put everything from the "svn --version" output into the cache,
which contains umlauts and other funny characters.
Fix the regexp to not only match " version " but also " Version " as
it's in the German output. I have no idea what will happen on a French
or Japanese system. This should be easy to test as it happens also on a
German Linux system.
b935f00 Close ENDFUNCTION() properly with the same name as FUNCTION()
07bca48 Set a default DESCRIPTION if none is given for ALL mode of feature_summary()
d5b2915 APPEND and not-APPEND mode of feature_summary() were swapped
In each CMake<lang>Information.cmake file we use an _INCLUDED_FILE
variable to track whether a compiler information file has been loaded.
Reset this variable for each language.
This fixes Fortran under VS generators with the Intel plugin.
Previously the variable would be left set true from C and C++ and then
Fortran would not load old-style files like Platform/Windows-ifort.
If a Qt installation is in CMAKE_PREFIX_PATH and a
QT_QMAKE_EXECUTABLE points to a qmake for a different Qt installation,
prefer finding libs in the latter Qt installation.
Use a separate variable to pass to the BUILD_COMMAND call
and then use set(CACHE) to transfer that to MAKECOMMAND.
That way, if MAKECOMMAND is in the cache already, it is
left untouched. Fixes regression introduced in commit
0b38bb4c with the fix for bug #2336.
Thanks to Evgeniy P for the patch.
Parse compiler flags like "-fmessage-length=0 -fstack-protector
-funwind-tables -fasynchronous-unwind-tables -fno-strict-aliasing" from
the output of "mpicc -show". We already handle preprocessor definition
arguments like -DUSE_STDARG. Honor '-f' flags too.
Add Boost_REALPATH option for people packaging Boost with their app:
Boost_REALPATH Resolves symbolic links for discovered boost libraries
to assist with packaging. For example, instead of
Boost_SYSTEM_LIBRARY_RELEASE being resolved to
"/usr/lib/libboost_system.so" it would be
"/usr/lib/libboost_system.so.1.42.0" instead.
This does not affect linking and should not be
enabled unless the user needs this information.
* Add a warning if the user sets Boost_ROOT which is not correct
* Clarify directions to the user for viewing debugging messages
* Move the CMAKE_FIND_LIBRARY_SUFFIXES tweak outside of a for loop
* Fixed issue 11204: FindBoost.cmake had trouble discovering libraries
when both -sgd and -gd libraries were available by adding a new option
Boost_USE_STATIC_RUNTIME.
Backwards compatibility of searching for first -gd and then -sgd on
WIN32 is maintained unless the user sets Boost_COMPAT_STATIC_RUNTIME to
false (or they have set Boost_USE_STATIC_RUNTIME).
* Fixed issue 8529: FindBoost was unable to detect boost libraries compiled against
STLport, by reworking the way the Boost ABI tag is calculated. There are additional
ABI tag options available now as well.
* Boost_DEBUG now reports the full list of filenames being searched for when
find_library is called.
Use a combination of response files and the archiver to support long
object file lists that do not fit in the Windows command-line length
limit. This can work only with GCC >= 4 because the MinGW GCC 3.x
front-ends do not support response-file syntax.
CUDA 3.2 on Windows systems changed the layout of the library paths. This adds the extra
directories needed to locate the new files.
I also explicitly disable emulation mode for CUDA 3.1+. This feature was deprecated in
3.0 and ultimately removed in 3.1. The script errors out if CUDA_BUILD_EMULATION is
turned on. I didn't want to ignore emulation mode (even with a warning - which most
people may not even see) and have users confused as to why it wasn't working.
The default value for CMAKE_INSTALL_PREFIX should be
based on what architecture the built targets are, not
what architecture CMake itself is.
This fix merely guesses better what the built targets
architecture is. It still may guess incorrectly in some
cases. For those cases, it will have to be up to build
scripts and developers on projects to pass in a correct
value for CMAKE_INSTALL_PREFIX with -D on the command line
or via 'force cache value' logic in CMakeLists.txt files.
7944e4e Allow testing of .CPP on WIN32 as it is a case insensitive OS and should work.
ba0a890 Only test for .CPP on Microsoft compilers which will handle .CPP as c++.
d26cd46 Only use .CPP .CXX and .C++ do not work by default with g+++.
ced61f5 Let CMake recognize .CPP .CXX and .C++ as c++ files.
ede24f8 ENH #8993: FindwxWidgets add support for wx-config custom options.
3dbeeb7 BUG #8184: Fixed FindwxWidgets wrong order of default libs for MinGW.
f46712e BUG #11123: Generic include dir should come after config specific one.
6cb14eb STYLE: Clarified/Fixed documentation of UsewxWidgets.
36c15a2 BUG #10658: FindwxWidgets USE_FILE should not include .cmake extension.
5cdfc9c Improve wording of the error message of find_package() in config-mode
4969c3b Improve version notice in the generated message
e8ae504 Add option CONFIG_MODE to FPHSA()
b4b8f96 Don't create an empty element at the end of Foo_CONSIDERED_CONFIGS/VERSIONS
cc955a0 Small cleanup of FindPackageHandleStandardArgs.cmake
0367245 Replace the two vector<string,string> with one vector<struct{string,string}>
130b0e2 Improve error message in Config-mode when no appropriate version was found
dfe9c95 Record all considered Config files and their versions.
This ensures that any bundle items are made user writable before
any attempt is made to alter them using install_name_tool. This is
because MacPorts/Fink/Homebrew don't install libraries as writable.
This fix is needed to allow fixup_bundle_item to work correctly
when ingesting libraries installed by these package managers.
Set CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH in the HP-UX platform file to
tell CMake to pass -Wl,+b,/usr/lib no matter whether RPATH is enabled or
not. This corrects the behavior of -Wl,+nodefaultrpath to look in this
default library path as documented.
The gdk-pixbuf library was split off from core GTK in 2.21 so it could be used
separately by people outside GTK. Now FindGTK searches and adds it to the
library/include list. Thanks to Vincent Untz for the patch and Ricardo Cruz
for the heads up.
This work was started from a patch by Thomas Schiffer.
Thanks, Thomas!
See the newly added documentation of the FOLDER target
property for details.
Also added global properties, USE_FOLDERS and
PREDEFINED_TARGETS_FOLDER. See new docs here, too.
By default, the FOLDER target property is used to organize
targets into folders in IDEs that have support for such
organization.
This commit adds "solution folder" support to the Visual
Studio generators. Currently works with versions 7 through
10.
Also, use the new FOLDER property in the ExternalProject
test and in the CMake project itself.
Include this prefix in CMAKE_SYSTEM_PREFIX_PATH so that it will be used
for all find* commands. Previously only find_library and find_path
would look under /opt/local/lib and /opt/local/include, respectively.
88e6447 Add macro ADD_FEATURE_INFO() and improve docs.
b353524 Improve wording of the documentation.
6fc88b2 Improve documentation.
3333878 Log the required package version and major improvement to FeatureSummary
3178767 Merge 'CPack-FixDESTDIR-Issue7000' from github.com:TheErk/CMake
6a521f8 CPack Enable better handling of absolute installed files
40dc97d CPack Backward-compatibly enforce DESTDIR for DEB and RPM
Now the version number is also printed if no required version was
specified, but a version number was detected (showing more information
shouldn't hurt).
The code for generating the failure message in config-mode is moved
into a separate helper macro, it was becoming too much.
Alex
When this option is used for FPHSA(), it automatically handles the
information created by a preceding find_package(NO_MODULE) all and
creates a proper success/error message.
Alex
ADD_FEATURE_INFO() can be used to set the info for a feature,
e.g. an option().
set_feature_info() has been renamed to set_package_info(), since this is
about found or not found packages. For compatiblity set_feature_info()
is still provided.
Alex
of http://github.com/themiwi/CMake
into fix-10747
Conflicts:
Modules/BundleUtilities.cmake
There was one newly added function in BundleUtilities.cmake
which also needed the same "documentation at top" treatment.
find_package() now also stores the required version automatically, so it
can be used by FeatureSummary.cmake.
This was one of the requested features for setting up nightly builds
for KDE, since with this functionality it will be possible to write
a file at the end of each project which lists all required packages
and their versions. This file could then be compared for equality
with an older one and if something has changed the build maintainer
can be emailed.
In FeatureSummary.cmake there is now a new function feature_summary(),
which also allows to print the log to a file or into a variable.
It also allows to specify whether to append to a file or to write a new
one, and what information to log.
Docs are still missing.
Alex
Fix bug 11120. Parameters files previously went into source
directory when qt4_generate_moc() was given relative paths.
Also simplified some logic for absolute paths.
This commit introduces the ability to add custom targets
that correspond to individual ExternalProject steps.
The main motivation behind this new feature is to drive
sub-project based dashboard steps as external projects
with separate targets for update, configure, build and
test output. This makes it easy to construct a ctest -S
script to drive such a dashboard.
With no STEP_TARGETS defined, there are no additional
custom targets introduced, to minimize the chatter in
the target name space. Clients may define STEP_TARGETS
on a per-ExternalProject_Add basis, or at the directory
level by setting the EP_STEP_TARGETS directory property.
The idea of the patch is to let the install generator define
CPACK_ABSOLUTE_INSTALL_FILES then when CMake is installing
project he will concatenate the list of files and give
it to specific CPack Generator by defining CPACK_ABSOLUTE_INSTALL_FILES
to be the list of ALL files that were installed using absolute destination.
An example of use has been applied to RPM generator which now
tries to automatically build a relocatable package.
Included patch by Simone Rossetto to check if either Python or Perl
are present in the system. Whichever intepreter that is detected
is now used to run the test generator program. If both interpreters
are detected, the CXXTEST_USE_PYTHON variable is obeyed.
Also added support for CXXTEST_TESTGEN_ARGS, for manually specifying
options to the CxxTest code generator.
c327cbd Modules: Fix CMakeParseArguments copyright notice
9eb6cc1 Merge branch 'module-notices' into CMakeParseArguments
b173b87 Add macro CMakeParseArguments() and use it in FPHSA()
In CMAKE_DETERMINE_COMPILER_ID_VENDOR() the compiler is called with various
arguments. In some cases, this can make the compiler hang and wait
forever for input (e.g. "as -v"). That's why add an timeout
so it terminates finally. 10 seconds should be more than enough,
this is the time it takes to startup the compiler, which is
usually quite fast.
Alex
For assembler, the "compiler ID" cannot be detected by "compiling" a
source file, since there is not source file all assemblers understand.
Instead the function CMAKE_DETERMINE_COMPILER_ID_VENDOR() is used to
run the assembler and check its output.
For this the CMAKE_DETERMINE_COMPILER_ID_VENDOR() function had to be
extended so that it creates the run directory if it doesn't exist yet.
In CMakeASMInformation.cmake now also CMAKE_ASM_COMPILER_ID is used
(but there are no such files yet, will come with the support for the
IAR toolchain).
Alex
ZLIB_VERSION_STRING was "1.2.3.#define ZLIB_VERSION "1.2.3"" here, because
the result of the matching for the tweak version was also appended if there
was no TWEAK version and the regexp failed, which gives as result not
an empty string, but the full string.
Now it is only appended if the regexp matches.
Alex
This adds a macro cmake_parse_arguments() (as discussed on cmake-devel)
which can be used in macros or functions to help with parsing its
arguments. Detailled docs are included.
find_package_handle_standard_args() is the first user of this new macro.
Alex
The _TARGET_SUPPORTS_SHARED_LIBS variable was being altered outside of
the find module, moving it into the function fixes any of these scoping
issues. Fix tested and verified in VTK and Titan.
BlueGeneP-base: Internal base shared by static and dynamic files
BlueGeneP-static: Platform file for all-static builds
BlueGeneP-dynamic: Platform file for "default" dynamic builds
* Add support for detecting fontconfig.h header
* Call find_package(Freetype) since it's required
* Add support for allowing users to add additional library directories
via the GTK2_ADDITIONAL_SUFFIXES variable (kind of a future-kludge in
case the GTK developers change versions on any of the directories in the
future).
* Fixed a problem on Windows where you had to configure twice to find
the gtk & gdk libraries
430336c Merge branch 'findsubversion_fphsa_cleanup'
b6c6156 Use FPHSA() in FindSWIG, including version checking.
656cd2f Improved version checking for FindCUDA using the new mode of FPHSA
126db7b Improved version checking for FindSubversion using the new mode of FPHSA()
77d909b Fix DETAILS string with version number in FHPSA()
19b68b9 Improved version checking for FindJava using the new FPHSA() mode
6bb0b6e Improved version checking for FindRuby using the new mode of FPHSA()
946493f FindSquish doesn't detect the version, remove that from the documentation
cb9d1ea Add version checking support to FindFlex and FindPerlLibs
Use response files for C and CXX languages with the Intel compiler on
Windows. We already used them for Fortran. This enables creation of
libraries and executables with a very large number of object files.
Read zlib.h by using file(STRINGS.....REGEX) to limit the amount of text we apply the version regex on. This patch also addresses the fact that the version string may contain a tweak component.
Patch by Simone Rossetto
This additional mode also supports version checking and should be
easily extendible, e.g. for COMPONENT stuff.
Updated FindBISON.cmake as first user of this new mode.
Docs updated.
Alex
The intent was to warn about misspelled keyword arguments,
but the effect was to warn about valid argument values far
too often. Let's stop annoying and confusing people.
By default, if an embedded item is a framework, copy its
main dylib file explicitly, and then also its Resources
if it has any.
Inspect a variable, BU_COPY_FULL_FRAMEWORK_CONTENTS, and
if it's ON, copy the entire framework into the bundle.
ExternalProject_Add calls that did not explicitly request a
CMAKE_GENERATOR would not get recursive parallel make behavior.
This commit fixes that issue.
38c762c Merge 'remove-CTestTest3' into ctest-file-checksum
46df0b4 Activate retry code on any curl submit failure.
8705497 Checksum test should use CMAKE_TESTS_CDASH_SERVER
d0d1cdd Mock checksum failure output for old CDash versions
af5ef0c Testing for CTest checksum
86e81b5 CTest should resubmit in the checksum failed case
d6b7107 Fix subscript out of range crash
082c87e Cross-platform fixes for checksum/retry code
e525649 Checksums on CTest submit files, and retry timed out submissions.
56da481 Changed ADDITIONAL_SEARCH_PATHS to PostgreSQL_ADDITIONAL_SEARCH_PATHS.
106de67 Forgot the copyright notice.
5ecfe16 Adding a FindPostgreSQL.cmake module
7fd3739 Find correct Qt plugins for cross-compiling.
ff888dd Fix some issues with refinding when qmake executable is changed.
22e725f Tweak for cygwin, don't convert : to ;
b55da4c Add cross-compiling support to FindQt4.cmake
Fix niggly in ExternalProject that would inadvertently
create a log file of output when a command was explicitly
set to the empty string.
Also, increase the default value for showing context
around build errors to 10 lines, up from 6. Also add
the ability to customize this setting so that users
can put it back to 6 or even lower if they want, or
show more if they want.
-remove trailing whitespace
-fix description of CPACK_RPM_PACKAGE_SUMMARY
-fix description of CPACK_RPM_PACKAGE_VENDOR
-fix description of CPACK_RPM_PACKAGE_PROVIDES
-do not put changelog of that file to generated RPM but read it from CPACK_RPM_CHANGELOG_FILE
-add CPACK_RPM_PACKAGE_URL
-add CPACK_RPM_PACKAGE_OBSOLETES
-add CPACK_RPM_PACKAGE_SUGGESTS
-add a loop so adding more user supplied header fields is easy
Signed-off-by: Eric NOULARD <eric.noulard@gmail.com>
Commit d84cbd0f (FindMPI: Parse mpicc flags more carefully, 2010-06-24)
broke parsing of '-L' flags appearing after '-Wl,' by expecting a
preceding space. Update the regular expression to allow '-Wl,-L' too.
Do not hard-code known BlueGene/L MPI libraries. We do not know their
location so the linker cannot find them without the proper -L search
path. The MPI compiler tells us about the libraries anyway, and if it
does not then the user can fix the problem locally by editing the
MPI_EXTRA_LIBRARY cache entry.
Extend the fix from commit 68c7d3e2 (FindMPI: Do not parse -l in middle
of library name, 2010-06-24). Parse -D, -I, -L, and -Wl only with
preceding spaces or at the beginning of the string.
ldd can return "not found" and we need to handle it correctly.
In that case, we extract only the name of the library instead of trying for its full path.
Some zlib.h files have ZLIB_VERSION "1.2.3.3" with 4 numbers instead of 3.
The regex is changed to grab the first 3 numbers.
It was slow because if it failed to find that string near the top of the file,
where it usually is, it would read the entire file.
We parse the output of 'mpicc -shome:link' to look for -l options
specifying libraries. Fix the parsing regex to avoid matching the
string '-l' in the middle of a library name.
Avoid issues with two external projects trying to extract two
separate trees at the same time into the same location. Should
fix the sporadically failing ExternalProject test on the dashboards
for parallel builds.
In version 3.0 of the CUDA toolkit when building code for emulation, you need to link
against a new version of the cuda run time library called cudartemu. This CL adds a check
for the new library and uses it when present and in emulation mode. Note that this
library is not present in previous or subsequent versions of the CUDA toolkit.
Optionally hide the output of each external project build step by
wrapping its command in a launcher script. Make output available in log
files instead. This simplifies the output of external project builds.
Tru64's make(1) resolves relative paths in "include" directives with
respect to the includer. This is inconsistent with all other known make
tools. Note that this make tool treats the path literally so we cannot
use our standard FULL path code which escapes spaces. Instead qualify
the paths with $(CMAKE_BINARY_DIR) to avoid the problem.
See http://public.kitware.com/Bug/view.php?id=10346.
The proposed patch for the issue could not be applied as is
because the SOURCE_DIR always exists for an ExternalProject_Add
call by the time we get to the place to emit the potential error.
The fix is to emit the error only if the source dir is empty.
By which, I mean devoid of files and subdirectories. If
SOURCE_DIR is used by itself, without any DOWNLOAD_COMMAND
or repository info, then it implies that the SOURCE_DIR is ready
to build as-is without need for a download step. Clearly, if it
is empty, then it is not ready to build as is. So complain if
the SOURCE_DIR is empty.
Commit 82c081ba (Fix rpath-link flag for SunPro C++ on Linux,
2009-07-13) taught CMake to pass '-rpath-link' because SunPro C++ 5.9
does not support '-Wl,'. Now SunPro C++ 5.11 does not recognize the
option without using '-Wl,'. Detect whether to use '-Wl,' based on the
output of "sunCC -flags".
Use it from ExternalProject and the ExternalProject test's
CMakeLists file rather than having duplicate find_program calls.
Add logic so that we do not try to use *.cmd variants of git
programs when using the MSYS Makefiles generator. Should fix
the last remaining dashboard issue with the new ExternalProject
git support additions.
Also, correct minor problem regarding placement of the local git
repo during test execution. On clean builds, it was being placed
incorrectly because of the ../.. relative reference. Use an absolute
path to place the local git repo in the proper directory, and only
use the relative reference when referring to it.
Add archives of these file types and add to the test
cases covered in the ExternalProject test.
Also add an "Example" directory in the Tests/ExternalProject
directory containing the canonical simplest example of
ExternalProject usage.
The ENABLE_EXPORTS property exports all symbols from executables on
UNIX-like platforms, typically for use by plugins. Honor this behavior
on Cygwin. See issue #10122.
Improve FILE(DOWNLOAD ...):
- Add percent complete progress output to the FILE DOWNLOAD
command. This progress output is off by default to
preserve existing behavior. To turn it on, pass
SHOW_PROGRESS as an argument.
- Add EXPECTED_MD5 argument. Verify that the downloaded
file has the expected md5 sum after download is complete.
- Add documentation for SHOW_PROGRESS and EXPECTED_MD5.
When the destination file exists already and has the
expected md5 sum, then do not bother re-downloading
the file. ("Short circuit" return.)
Also, add a test that checks for the status output
indicating that the short circuit behavior is actually
occurring. Use a binary file for the test so that the
md5 sum is guaranteed to be the same on all platforms
regardless of "shifting text file line ending" issues.
Improve ExternalProject:
- Add argument URL_MD5.
- Add verify step that compares md5 sum of .tar.gz file
before extracting it.
- Add md5 check to download step, too, to prevent
unnecessary downloads.
- Emit a warning message when a file is not verified.
Indicate that the file may be corrupt or that no
checksum was specified.
Fixes issue http://public.kitware.com/Bug/view.php?id=10258
Also, fix complaint that DOWNLOAD_COMMAND cannot contain arguments
consisting entirely of upper case letters. It validly does when,
for example, you construct a custom cvs command line and the module
name is all upper case, like VTK.
Put the function documentation into the header-comment, improve
formatting and list the user-relevant functions first.
Signed-off-by: Michael Wild <themiwi@users.sourceforge.net>
Put the function documentation into the header-comment, improve
formatting and list the user-relevant functions first.
Signed-off-by: Michael Wild <themiwi@users.sourceforge.net>
Map to the platform and compiler information for GNU because the
compilers are command-line compatible for common operations. Later we
can add Clang-specific features as necessary. We honor the preferred
capitalization is "Clang", not the common mis-spelling "CLang".
CUDA_VERSION_MAJOR and CUDA_VERSION_MINOR were only computed when CUDA_VERSION was first
computed. Subsequent runs of FindCUDA would not have CUDA_VERSION_MAJOR/MINOR set. We
now extract the major and minor versions from the CUDA_VERSION cache variable every run.
Was not removing definition flags (-D...) from cxx flags,
when the definition flag was last in the list returned from
wx-config.
--HG--
extra : rebase_source : 3452c52b92717f181e902abef38c1e2718ce3b27
Was not removing definition flags (-D...) from cxx flags,
when the definition flag was last in the list returned from
wx-config.
--HG--
extra : rebase_source : 3452c52b92717f181e902abef38c1e2718ce3b27
Synced from KDE svn: pkg_check_modules() and pkg_search_module() now
both support a QUIET keyword. When given, no messages will be printed (except the REQUIRED ones)
This also fixes#10469 (confusing output of FindLibXml2.cmake)
Alex
After configuring CMakeFiles/CMake<lang>Compiler.cmake in the build tree
the second time (to store ABI information), include it immediately.
This allows any logic and settings in the compiler information files to
be used without duplicating it in CMakeDetermineCompilerABI.cmake.
The change in commit "Use Fortran ABI detection results conservatively"
(2010-05-05) needs this to use the same logic to set CMAKE_SIZEOF_VOID_P
during first and later runs of CMake.
We set CMAKE_Fortran_SIZEOF_DATA_PTR in the Fortran compiler information
file after detecting the compiler ABI. However, since Fortran does not
really have pointers, the preprocessor-based detection is unreliable.
The result is needed to set CMAKE_SIZEOF_VOID_P only for Fortran-only
projects because the value can come from C or C++ compilers otherwise.
Therefore when CMAKE_SIZEOF_VOID_P is available from another language we
should defer to it.
The expectation of users of the MSVC60, MSVC70, MSVC71, MSVC80, MSVC90
and the new MSVC10 variables is that at most one of them will be set
for any given build tree. This change enforces that expectation for
build trees using Makefile generators. It also fixes the one mismatch
in that expectation to be found in the Visual Studio generator world:
previously, the VS 7.1 generator would set *both* MSVC70 and MSVC71;
now, it only sets MSVC71.
With these changes, user expectations are now met, and the recently
introduced CheckCompilerRelatedVariables test should pass everywhere.
This means that the user no longer sees this value _but_ this is backwards compatible because setting JASPER_LIBRARIES had no effect previously because we would override it using set()
As reported on the mailing list, find_path/file/library/program() basically don't work
at all if CMAKE_FIND_ROOT_PATH is set and searching in the host system directories
is disabled. This patch adds /include, /lib and /bin to the search directories, so they
will be appended to CMAKE_FIND_ROOT_PATH so this will work for the "Generic" platform (embedded
systems without OS)
Alex
(I accidentially removed ExternalProject.cmake from git by doing
mv ExternalProject.cmake ExternalProject.cmake.save
git checkout master
which I hoped would basically do a revert as it does with svn and cvs, but it
deleted the file from git)
Alex
Detect the runtime linker's search path and add to the compile time
linker's search path. This is needed because OpenBSD's static linker
does not search for shared library dependencies in the same places as
the runtime linker.
Teach compiler identification to support values such as
export CC='gcc -g -O2'
by separating the arguments on spaces. We already do this for the
values of CFLAGS, CXXFLAGS, and FFLAGS.
This allows the user not to link to the common libraries,
which are regularly required. The user must specify all
libraries that he does want to link in the find_package
line (png tiff jpeg zlib regex expat).
--HG--
extra : rebase_source : df29f96c957600629a34a1c5fafb8b3d6f274e22
Allow the user to set the CMake variable CTEST_COST_DATA_FILE, which will be used to store the cost data from test runs. If not set, defaults to the original location in the build tree Testing/Temporary dir.
Commit "Modernize GNU compiler info on Windows" (2009-12-02) reorganized
GNU flags on Windows but let -fPIC slip through for compilation of
objects in shared libraries. While this flag is valid on most GNU
compiler platforms we need to suppress it in Windows-GNU.cmake just as
we already do in CYGWIN-GNU.cmake.
This modifies the behavior of PYTHON_WRITE_MODULES_HEADER, should be backwards
compatible. Also marked a couple of the variables generated by adding Python
modules as advanced.
PathScale Fortran mangles module symbols as "MY_SUB.in.MY_MODULE" and
also requires "my_module_" when the module is imported. We cannot
provide the symbol with ".in." mangling so we should not provide
"my_module_" because it would duplicate the one in the Fortran-provided
object file.
Commit "FortranCInterface: Fix PathScale detection" (2010-01-22) already
made the same fix for the non-underscore module case.
In the CTest module we previously warned if the source directory did not
contain known version control directories. The message was:
"CTest cannot determine repository type. Please set UPDATE_TYPE
to 'cvs' or 'svn'. CTest update will not work."
This was confusing when building sources from a tarball. Furthermore,
we now support many more version control tools. This feature is now
mature enough that the warning causes confusion more than it provides
real help. We simply remove it.
The compiler documents symbols _DF_VERSION_ and _VF_VERSION_ but they do
not seem to be available to the preprocessor. Instead we add a vendor
query table entry for Compaq. Running "f90 -what" produces
Compaq Visual Fortran Optimizing Compiler Version ...
This clearly identifies the compiler.
At least one Fortran compiler does not provide a preprocessor symbol to
identify itself. Instead we try running unknown compilers with version
query flags known for each vendor and look for known output. Future
commits will add vendor-specific flags/output table entries.
PathScale Fortran mangles module symbols as "MYSUB.in.MYMODULE" and also
requires "mymodule_" when the module is imported. We cannot provide the
symbol with ".in." mangling so we should not provide "mymodule_" because
it would duplicate the one in the Fortran-provided object file.
In commit "use export all symbols on cygwin" (2003-01-21) we started
passing -Wl,--export-all-symbols when linking shared libraries. Now
cygwin exports all symbols automatically if no symbols are explicitly
exported. When symbols are explicitly exported we want to honor that
narrow interface. Therefore this flag should not be passed.
Change based on patch from issue #10122.
The variable should contain the name of a library needed to link the
symbol equivalent to dlopen. On Cygwin no special library is needed,
and certainly not "gdi32".
Change based on patch from issue #10122.
After discussing with Brad and Clinton:
-the namespace for the imported targets is now "Qt4::", tested with Makefiles, Visual Studio and XCode projects
-the imported targets are always created
-if QT_USE_IMPORTED_TARGETS is set to TRUE (it defaults to FALSE), the QT_QTFOO_LIBRARY variables are set to point to these imported
targets, otherwise the old behaviour is used.
-on OSX if Qt has been found as framework, disable QT_USE_IMPORTED_TARGETS, since cmake doesn't handle the framework directory as location of the library correctly
Alex
-set the type of the IMPORTED libraries to UNKNOWN, this way also on Windows
only the "LOCATION" property has to be set
-the if() around the SET(QT_${basename}_FOUND 1) was useless (always true)
-the mapping of the configuration types DEBUG and PROFILE did not belong here
Alex
This commit syncs FindQt4.cmake again with KDEs version.
Now for every Qt library an imported target with the name
Qt4ImportedTarget__<LIBNAME> is created.
This way we can now finally handle the release and debug versions of the Qt
libraries correctly.
Also, if a Qt-using project A installs a file with exported targets, these
targets now depend on the imported Qt targets, e.g.
Qt4ImportedTarget__QtCore. The location of QtCore is then resolved at
buildtime of project B, which uses the exported targets from project A.
Before this patch the full path to the QtCore on the original build machine
of project A was stored, so this had to match the directory layout on the
build machine for project B.
Alex
While Cygwin supports linking directly to .dll files, the behavior is
now discouraged. All Cygwin packages now provide import libraries of
the form lib*.dll.a and CMake has built the import libraries for years.
We believe it is now safe to stop explicitly searching for .dll files
because their import libraries will always be available when the
corresponding header files are available. Users can always set
find_library cache entries to point at a .dll file by hand if they
really must use one.
Change based on patch from issue #10122.
Commit "Find locally installed software first" made /usr/local the first
prefix searched to be consistent with the Filesystem Hierarchy Standard:
http://www.pathname.com/fhs/
The standard also implies that the root prefix "/" should not have any
package or development files. The "/bin" and "/lib" directories should
have only minimal contents to boot the system. No "/include" ever
exists. This commit re-orders the search path prefix list from
/usr/local
/
/usr
to
/usr/local
/usr
/
to prefer package and development files over low-level system files.
See issue #10136.
On Cygwin /usr/lib == /lib and /usr/bin == /bin. This change also makes
search results report locations as "/usr/..." instead of "/lib/...".
See issue #10122.
We add compiler information files
Compiler/PathScale-<lang>.cmake
to specify PathScale compiler information for C, C++, and Fortran
languages. We use a macro in Compiler/PathScale.cmake to consolidate
the information common to all languages.
The commit "Drop -rdynamic from Linux build rules" removed default use
of the flag on Linux. It was expected to be compatible because any
project using plugins should set ENABLE_EXPORTS on its executables to
export their symbols for use by the plugins in a cross-platform way.
However, it is possible to build without ENABLE_EXPORTS and load plugins
that do not link to any symbols from the executable explicitly. These
plugins may need to see RTTI and other executable symbols needed by the
language implementation. Executables using such plugins were broken by
the change.
If we want to remove the -rdynamic flag in the future we should do so in
a compatible way. At that time we should also remove equivalent flags
on other platforms (like -bexpall on AIX). We will either need a policy
or an explicit API to disable symbol exports on executables.
The primary purpose of the above-mentioned commit was to avoid passing
the -rdynamic flag to compilers on Linux that do not support it. In
this commit we restore the flag but only on GNU and Intel compilers
which are known to support it.
See issue #9985.
Implement Fortran 32/64-bit ABI detection on some platforms. We need to
set CMAKE_SIZEOF_VOID_P correctly in Fortran-only projects so that the
find_library() command knows whether to look for 64-bit binaries. We
also detect ELF binaries to enable RPATH replacement. See issue #10119.
Now the case that both the release- and the debug-version of a library is
handled first, because otherwise we always ran into this branch, since the
debug-only and the release-only branch also set both variables.
Alex
We modify the signature of _HDF5_parse_compile_line to pass the command
line variable name rather than the command line itself. Otherwise the
CMake language MACRO implementation tries to parse the command line as
CMake syntax, which does not like backslashes.
We re-implement this module to support architecture-dependent type
sizes. In the mixed-size case we generate C preprocessor code to select
the detected type size for each architecture.
before this patch -F<framework> dir had to be added manually in some way
when using Qt4 installed as framework and when using FindQt4.cmake directly,
i.e. without UseQt4.cmake. With this patch the framework dir is
automatically added to QT_INCLUDE_DIR when Qt is installed as a framework.
Ok by Clinton, tested already in KDE by Mike Arthur.
Alex
The commit "FortranCInterface: Honor language flags in checks" taught
the FortranCInterface module to pass C and Fortran flags into its
detection and verification checks. We improve on the change to allow
the '=' character in the language flags. This requires passing the
cache entry type with the -D options.
CMake 2.8 was released with the FindHDF5 module setting HDF5_INCLUDE_DIR rather
than the correct plural HDF5_INCLUDE_DIRS. Since this went into a release, it is
now necessary to set the singular for backwards compatibility.
Replace them with CPACK_PACKAGE_NAME. The registry keys involved in this commit are used by Windows to track things in the Add/Remove programs portion of the Control Panel. With '\' characters in the keyname, the calls do not do what they are intended to do and the installed program never shows up in the control panel view. (Details noted in the issue itself.) Thanks to 'killerfox' for the patch.
Default to "" for CMAKE_OSX_DEPLOYMENT_TARGET if CMAKE_OSX_SYSROOT is set. Also, add new error message to detect the case where there is a deployment target, but no SDK has been set. Fix args to STRING REGEX call so that it works even if _sdk_path variable is empty inside sanity check function.
When there is no shared object to link to a second call to find library is
necessary to find the static Python library. Fixes an issue raised on the CMake
mailing list, and it should be included in the next CMake patch release.
We add the macro CMAKE_FORCE_Fortran_COMPILER to the cross-compiling
helper module CMakeForceCompiler.cmake so that toolchain files can force
a Fortran compiler as well as C and C++ compilers. See issue #10032.
CMake does not enable Fortran for its own build, but it needs to find a
Fortran compiler to know if it is possible to enable Fortran tests.
Previously we searched for a hard-coded list of Fortran compilers which
was duplicated from the CMakeDetermineFortranCompiler.cmake module. We
now run CMake on a small test project that enables the Fortran language
and reports the compiler it found. This represents a more realistic
check of whether the Fortran tests will be able to find a compiler.
Previously this module gave only very brief documentation. We extend
the module's documentation to describe CTestConfig.cmake, interaction
with dashboard scripts, and the CTEST_USE_LAUNCHERS option.
We remove the shared library compile/link flags "-fPIC" and "-shared"
because they are not provided by all compilers on Linux. This allows us
to drop code from the Linux-XL-*.cmake files that erases the bad flags.
All other supported compilers already provide their correct flags for
Linux in their own platform information files.
We factor flags from Platform/Linux-PGI-Fortran.cmake into language
independent helper modules
Compiler/PGI.cmake
Platform/Linux-PGI.cmake
and invoke the macros from
Compiler/PGI-<lang>.cmake
Platform/Linux-PGI-<lang>.cmake
This enables general support for the PGI compilers.
The commit "Split GNU compiler information files" intended to move GNU
flags from the platform-wide Platform/SunOS.cmake module into
Platform/SunOS-GNU-<lang>.cmake
using a helper module Platform/SunOS-GNU.cmake to consolidate flags.
However, it accidentally put Fortran flags in the C language module and
left out the Fortran module altogether. This fixes those mistakes.
Several platform-wide linker flag variables are defined in
Modules/Platform/<os>.cmake files for C and then copied by the
Modules/CMake<lang>Information.cmake file for each language.
We now use this approach for the variables
CMAKE_EXE_EXPORTS_${lang}_FLAG
CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG
CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS
to avoid duplication for multiple languages in each platform file.
The commit "Split GNU compiler information files" broke the settings of
CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS
CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS
and started using just "-shared" for them. This worked when tested on newer
Mac machines, but older ones really need "-dynamiclib" and "-bundle" (which are
the documented flags anyway).
This moves GNU compiler info on Windows into new-style modules
Platform/Windows-GNU-<lang>.cmake
using language-independent helper module
Platform/Windows-GNU.cmake
to define macros consolidating the information.
This moves GNU compiler flags into new-style modules
Compiler/GNU-<lang>.cmake
Platform/<os>-GNU-<lang>.cmake
We use language-independent helper modules
Compiler/GNU.cmake
Platform/<os>-GNU.cmake
to define macros consolidating the information.
The CMakeBackwardCompatibilityC module provides some try-compile results
that were automatically provided by CMake 1.4. When performing the
checks for OS X universal binaries we just pick one architecture to get
through the checks without error. Since CMake 1.4 did not support any
universal binaries, projects that want them should not depend on this
compatibility module anyway.
This is a GNU-specific option that should not be specified for all
compilers on Linux. It tells the GNU compiler to pass -export-dynamic
to the linker to export symbols from executables for use by plugins.
Since we provide the ENABLE_EXPORTS target property to do the same thing
in a cross-platform way, there is no need to pass -rdynamic always.
Since the option is not useful for GNU tools and breaks other tools on
Linux we simply remove it from CMAKE_SHARED_LIBRARY_LINK_<lang>_FLAGS.
This also allows us to stop setting the variable in other Linux compiler
files just to erase the bad flag.
See issue #9985.
The Watcom tools do their own command-line parsing and do not accept
double-quotes. Instead we single-quote the target output name when
invoking wlink and other Watcom tools. This fixes support for spaces in
the target output directory path when it is not under the build tree.
-use find_package(PkgConfig) instead of include(UsePkgConfig)
-remove the "if already cached make silent" logic, this is already handled by find_package_handle_standard_args()
-remove the if(WIN32) around pkg-config, it shouldn't be necessary
Alex
We pass CMAKE_C_FLAGS, CMAKE_CXX_FLAGS, and CMAKE_Fortran_FLAGS through
try_compile() for the FortranCInterface Detect and Verify projects.
This honors user-specified compiler flags for each language, thus
supporting flags that affect the Fortran mangling.
The FortranCInterface module should execute with CMake 2.8.0 behavior
even if policies are set differently by the including project. In
particular, it makes use of empty list elements and therefore expects
NEW behavior of CMP0007.
Qt4Macros.cmake: all the "public" macros of FindQt4.cmake
Qt4ConfigDependentSettings.cmake: the code for detecting the
Qt-configuration dependent additional libraries, e.g. when linking statically.
There should be no functional changes in this patch.
The patch reduces the length of FindQt4.cmake from 1700 lines to around 1000
lines, which is still long enough, but this should make the file a easier to
handle (and it is similar to what we do in KDE with FindKDE4Internal.cmake
and KDE4Macros.cmake)
Ok by Clinton.
Alex
This should not change the result (since both should be in the same
directory), but seems a bit more logical and is also in sync with what is done in the KDE version.
Alex
-the mark_as_advanced() calls for the variables coming from qmake are now in
the corresponding section, and not in the section where the include dirs are
foudn
Alex
Some compilers use implicit link options of the form
-lcrt*.o
-lgcc*
-lSystem (on Mac)
-lSystemStubs (on Mac)
that provide system-wide symbols not specific to any language.
These need not be listed explicitly for mixed-language linking.
We teach CMake to remove the above items from the implicit library list
of each language. This change makes it possible to mix GNU compiler
versions in some cases.
BUILD_SHARED_LIBS is now only recognized when calling CUDA_ADD_LIBRARY. If you want the CMAKE_SHARED_LIBRARY_C/CXX_FLAGS to be used, pass SHARED as an argument. This prevents -fPIC from being used on objects destined for executables by default.
We replace "/MD" with ifort-specific flags as follows:
/MD -> /threads /libs:dll
/MDd -> /threads /libs:dll /dbglibs
We also enable the "/MD" equivalent for all Fortran configurations.
Previously multithreaded dll runtimes were used for release builds and
threaded static runtimes for debug builds. For mixed Fortran C/C++
projects, this led to link warnings for Debug but not for Release.
See issue #8744.
We add Intel and MinGW Fortran linker options to create the import
library portion of a DLL. This allows other binaries to link to a
Fortran DLL.
We also update the Fortran test to use a .def file to specify exports
since there is no __declspec(dllexport) markup syntax in Fortran.
This commit teaches CMake about the g95 compiler from
http://www.g95.org
We use 'G95' as the compiler id string, and add some basic flags.
See issue #9241.