Commit Graph

4420 Commits

Author SHA1 Message Date
Brad King 484112d045 Merge topic 'fix-build-without-qt4-with-qt5'
444e752 FindQt4: Fix QUIET failure with Qt 5 but not Qt 4
2013-05-21 15:13:21 -04:00
Stephen Kelly 444e752294 FindQt4: Fix QUIET failure with Qt 5 but not Qt 4
The call

 find_package(Qt4 QUIET)

should be non-FATAL in that case. This fixes #14142.
2013-05-21 14:52:26 -04:00
Brad King ffda082e65 Sanitize linker name to parse implicit link line (#14154)
Teach CMakeParseImplicitLinkInfo to convert the CMAKE_LINKER file name
to a regular expression that matches only the original name.  Escape
special characters like '+' so they are not treated as regex syntax.
Extend the ImplicitLinkInfoTest to test handling of a CMAKE_LINKER value
with many special characters.
2013-05-17 08:47:35 -04:00
Brad King 86cecd1c6b Merge topic 'cpack-reg-key-doc'
3fde03c Improve documentation for CPACK_PACKAGE_INSTALL_REGISTRY_KEY.
2013-05-16 14:38:43 -04:00
Brad King f122dd3d47 Merge topic 'vs-configurations'
42bb42d VS: Always initialize CMAKE_CONFIGURATION_TYPES in IDE generators
2013-05-16 14:38:40 -04:00
Brad King f2a0671259 Merge topic 'UseJava-cross-compile'
778aacc Allow using Java in a cross-compilation toolchain
2013-05-16 14:38:16 -04:00
Brad King 19bd84b3cd Merge topic 'vs-compiler-id-arm'
e4c0465 VS: Detect MSVC compiler id on ARM toolchain
2013-05-16 14:38:12 -04:00
Brad King 0dc0e7d885 Merge topic 'doc-improvements'
7cc2805 Docs: Clarify wording "flag used" => "flag (to|will) be used"
2378a69 Docs: Clarify that CMAKE_*_(PREFIX|SUFFIX) affect filenames
56ca34d Docs: Update description of CMAKE_(BUILD_TYPE|CONFIGURATION_TYPES)
2bab472 VS10: add detailed comment about MIDL processing
e619111 Explain distribution of Win9x binary on all Windows versions.
5ca4336 FindwxWidgets: add DOC strings with usual style
f57800d Fix spelling and typos (product names)
bf019d7 Fix spelling and typos (non-binary)
ddac8d3 Fix spelling and typos (affecting binary data / module messages)
86832ce Fix spelling and typos (affecting users)
2013-05-16 14:38:07 -04:00
Brad King e855dd54df Merge topic 'ExternalProject-svn-auth-blank'
ecd11a2 ExternalProject: Allow blank SVN_USERNAME/SVN_PASSWORD (#14128)
2013-05-16 14:37:50 -04:00
Brad King 18a5c4f4c6 Merge topic 'implicit-linker-detection'
a2bc47d Recognize ld with toolchain prefix (#13960)
2013-05-16 14:37:46 -04:00
Brad King 831dd5abab Merge topic 'cpack-nsis-uninstall'
40566ef CPack/NSIS: Obtain path from which to uninstall from registry (#14124)
2013-05-16 14:37:43 -04:00
Brad King 823022dd2e Merge topic 'WindowsPaths-MinGW-cross-compile-only'
f9eee7f Windows: Search '/' prefix only when cross compiling (#10994)
2013-05-16 14:37:28 -04:00
Brad King e6f2a0d1c8 Merge topic 'check-compiler-flag-locale'
5272372 Check{C,CXX}CompilerFlag: Test using C locale (#14102)
2013-05-16 14:37:17 -04:00
Brad King 3256ecb7b9 Merge topic 'Cuda_WRAP_SRCS_duplicates'
32b582d FindCUDA: Remove duplicate entries from INCLUDE_DIRECTORIES.
2013-05-16 14:37:13 -04:00
Brad King e778522161 Merge topic 'cuda_compute_build_path'
cd2d248 FindCUDA: CUDA_COMPUTE_BUILD_PATH uses relative paths to binary dir.
2013-05-16 14:37:05 -04:00
Brad King d04e765d76 Merge topic 'OpenGL-require-includes'
5be3593 FindOpenGL: require headers to be found on non-Windows platforms (#13746)
b10a171 FindOpenGL: simplify OS selection code
2013-05-16 14:36:59 -04:00
Brad King d86d0e622a Merge topic 'xcode-explicitFileType'
5683146 Xcode: Use explicitFileType to mark source types (#14093)
2013-05-16 14:36:54 -04:00
Brad King 3a0014a1fe Merge topic 'AddIARToolchain2'
d118b8b Add IAR to the CMakeDetectC(XX)CompilerID.c(pp).in
d33f406 Add regexps for the IAR toolchain to the vendor list.
22fb73a Add support files for C, C++ and ASM for the IAR toolchain.
2013-05-16 14:36:44 -04:00
Brad King 0d217e64d0 Merge topic 'CrossCompilingFix13796'
efb19b6 CMakeSystem: include toolchain file after setting CMAKE_HOST_ (#13796)
2013-05-16 14:36:39 -04:00
Brad King 5c2084b74b Merge topic 'fix-comment-typos'
8e0da4c Fix some copyastos in the DetermineRCCompiler file.
2013-05-16 14:36:31 -04:00
Brad King 5386aaecd4 Merge topic 'FindOpenSSL-cross-compiling'
1b614e0 FindOpenSSL: Fix spelling of CMAKE_CROSSCOMPILING (#14075)
2013-05-16 14:36:23 -04:00
Brad King 1b4b64cd3c Merge topic 'vs-no-compiler-pdb-setting'
87c0d16 Ninja: Fix OBJECT_DIR placeholder path conversion
fb9f73d MSVC: Invoke 'link' directly for executables
42ba1b0 VS: Separate compiler and linker PDB files (#11899, #14062)
2013-05-16 14:36:11 -04:00
Brad King 7e7b7fe4b3 Merge topic 'CPackRPM-avoidOwningSystemDirs'
f055c99 CPackRPM add /usr/lib64 to the list of builtin to-be-excluded path
bac5772 CPackRPM add mechanism to remove path from generated list of file in RPM spec.
2013-05-16 14:36:00 -04:00
Brad King e392520309 Merge topic 'CPackRPM-componentizedUserSpecFile'
2ef908f Add support for componentized USER spec file
2013-05-16 14:35:55 -04:00
Clinton Stimpson 3fde03cd8c Improve documentation for CPACK_PACKAGE_INSTALL_REGISTRY_KEY.
Fixes issue 13787.
2013-05-13 22:22:45 -06:00
Brad King 42bb42d197 VS: Always initialize CMAKE_CONFIGURATION_TYPES in IDE generators
Initialize the CMAKE_CONFIGURATION_TYPES cache entry early during
EnableLanguage like the Xcode generator does.  Avoid depending on
the MSVC compiler information module to do it.  Otherwise code like

  project(MyProj NONE)

sets CMAKE_CONFIGURATION_TYPES late (in GenerateConfigurations), and
to only "Debug" and "Release" instead of the standard set of 4.

Reported-by: Paul Smith <paul@mad-scientist.net>
2013-05-13 11:07:46 -04:00
Gregoire Lejeune 778aacc864 Allow using Java in a cross-compilation toolchain
Since Java is a portable language, if you want to use Java when
cross-compiling, UseJava uses the JVM installed on the host.  So in this
case, we must use set CMAKE_JAVA_INCLUDE_FLAG_SEP for the current host.
2013-05-08 11:45:34 -04:00
Alexander Mohr e4c046521f VS: Detect MSVC compiler id on ARM toolchain
This enables detection with the VS2012 CTP for windows Blue (8.1).
To build native ARM you need to have the WOA SDK (Windows on ARM).
2013-05-08 09:10:52 -04:00
Andreas Mohr 5ca4336ece FindwxWidgets: add DOC strings with usual style 2013-05-07 08:42:20 -04:00
Andreas Mohr f57800d6f5 Fix spelling and typos (product names)
API, Borland, MinGW, UNIX, Mac OS X.
2013-05-07 08:42:20 -04:00
Andreas Mohr bf019d765d Fix spelling and typos (non-binary) 2013-05-07 08:39:19 -04:00
Andreas Mohr ddac8d3d2d Fix spelling and typos (affecting binary data / module messages) 2013-05-07 08:39:19 -04:00
Matt McCormick ecd11a25cc ExternalProject: Allow blank SVN_USERNAME/SVN_PASSWORD (#14128)
With

  SVN_USERNAME ""
  SVN_PASSWORD ""

in an ExternalProject_Add() call, the blank username and password
will be passed to the svn checkout/update step commands.
2013-05-06 13:16:18 -04:00
Brad King a2bc47df1a Recognize ld with toolchain prefix (#13960)
Teach CMAKE_PARSE_IMPLICIT_LINK_INFO to recognize linker invocations
of the form "<toolchain-prefix>-ld" e.g. "x86_64-pc-linux-gnu-ld".
2013-05-06 08:45:34 -04:00
David Golub 40566ef2f8 CPack/NSIS: Obtain path from which to uninstall from registry (#14124)
Without this, when CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL is set,
the installer tries to uninstall the old version from the default
installation path for the new version, rather than using the path from
the registry where the old version is installed.
2013-05-02 10:22:20 -04:00
Brad King f9eee7f183 Windows: Search '/' prefix only when cross compiling (#10994)
Commit dac78148 (...makes the mingw cross compiler work out of the
box..., 2007-08-02) added to CMAKE_SYSTEM_PROGRAM_PATH and
CMAKE_SYSTEM_LIBRARY_PATH paths like "/bin" and "/lib" with no Windows
drive letter so that cross-compiling to Windows from Linux would search
these paths under CMAKE_FIND_ROOT_PATH.  Later commit 2a782880 (...use
CMAKE_SYSTEM_PREFIX_PATH when possible, 2008-01-16) generalized this
approach by instead adding "/" to CMAKE_SYSTEM_PREFIX_PATH.

Both commits assumed that the paths would never match anything on
Windows hosts without a drive letter.  However, Windows evaluates these
paths relative to the current working drive letter so find_* commands
may report paths like "/lib/..." when paths like "c:/lib/..." exist on
what happens to be current drive.  Such drive-less paths are not
reliable when the working drive changes, so we should not use them.

Fix WindowsPaths.cmake to add '/' to CMAKE_SYSTEM_PREFIX_PATH only when
cross-compiling to Windows from a non-Windows host.  This will avoid
searching and finding local paths without a drive letter on Windows.
2013-04-25 09:07:45 -04:00
Brad King 52723722c7 Check{C,CXX}CompilerFlag: Test using C locale (#14102)
Set the locale to C while running the compiler for these checks because
we match the resulting warning messages in English only.

Suggested-by: Marco Nolden <m.nolden@dkfz-heidelberg.de>
2013-04-22 08:50:08 -04:00
Marcel Loose 32b582d8a5 FindCUDA: Remove duplicate entries from INCLUDE_DIRECTORIES.
As of CMake 2.8.8, the INCLUDE_DIRECTORIES() command does
not de-duplicate entries. Failure to do so can lead to an extremely
long and repetitive list of -I entries on the command line.
2013-04-18 15:15:51 -04:00
Mathias Gaunard cd2d2480cc FindCUDA: CUDA_COMPUTE_BUILD_PATH uses relative paths to binary dir.
make CUDA_COMPUTE_BUILD_PATH use a relative path to the current
binary directory instead of the current source directory if the source
file considered is in the current binary directory. This is done to
shorten the paths given to the compiler.
2013-04-18 09:07:52 -04:00
Rolf Eike Beer 5be35935dc FindOpenGL: require headers to be found on non-Windows platforms (#13746) 2013-04-17 12:59:52 +02:00
Rolf Eike Beer b10a1713dc FindOpenGL: simplify OS selection code
This was using nested if's, now it uses elseif to flatten that. It also removes
one "if" from the general "else" branch that checks for Apple, as that has it's
own branch anyway and can't be true at this point.
2013-04-17 12:46:13 +02:00
Brad King 5683146185 Xcode: Use explicitFileType to mark source types (#14093)
Replace use of lastKnownFileType with explicitFileType to insist
that Xcode treat the file as we ask.
2013-04-16 15:44:48 -04:00
Alex Neundorf d118b8b389 Add IAR to the CMakeDetectC(XX)CompilerID.c(pp).in
With the AVR IAR compiler this can't be found, but it works e.g. for the
ARM AVR compiler.

Alex
2013-04-15 09:14:35 -04:00
Alex Neundorf d33f40638d Add regexps for the IAR toolchain to the vendor list.
The IAR compilers produce object files where the plain strings at least
sometimes can't be found, see:

  http://www.cmake.org/Bug/view.php?id=10176#c19598

Alex
2013-04-15 09:13:10 -04:00
Alex Neundorf 22fb73a0d6 Add support files for C, C++ and ASM for the IAR toolchain.
The original feature request is at http://www.cmake.org/Bug/view.php?id=10176
Documentation can be found at http://www.iar.com/website1/1.0.1.0/675/1/

Alex
2013-04-15 09:11:17 -04:00
Alex Neundorf efb19b6d45 CMakeSystem: include toolchain file after setting CMAKE_HOST_ (#13796)
Make the CMAKE_HOST_* variables always available in the toolchain file.
They are when the file is included in CMakeDetermineSystem.cmake, and
now also here.  For the non-cross-compiling case this does not change
anything at all.

Alex
2013-04-15 09:06:21 -04:00
Stephen Kelly 8e0da4cddc Fix some copyastos in the DetermineRCCompiler file. 2013-04-14 09:03:48 +02:00
Robin Lee 1b614e018c FindOpenSSL: Fix spelling of CMAKE_CROSSCOMPILING (#14075)
Use of the mis-spelled variable name 'CMAKE_CROSS_COMPILING' was
introduced by commit 4b793ad1 (FindOpenSSL: find cross-compiled OpenSSL
from MinGW, 2012-07-23).  Fix the spelling.
2013-04-12 08:50:06 -04:00
Brad King fb9f73de64 MSVC: Invoke 'link' directly for executables
Update the CMAKE_<LANG>_LINK_EXECUTABLE rule variable to invoke the
linker directly instead of through the compiler.  We already do this
for DLL linking with CMAKE_<LANG>_CREATE_SHARED_LIBRARY.

This also works around a VS 6 cl bug.  While invoking the link tool
internally it fails to correctly quote flags like /pdb:... with spaces
in the value.
2013-04-08 13:03:56 -04:00
Brad King 42ba1b08f3 VS: Separate compiler and linker PDB files (#11899, #14062)
The MS tools create two types of PDB files as explained here:

 http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.71%29.aspx
 http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.80%29.aspx
 http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.90%29.aspx
 http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.100%29.aspx

One is created by the compiler (/Fd) and the other by the linker (/pdb).
The two options should not specify the same file.  Split them up.

In the VS IDE generators, simply drop ProgramDataBaseFileName to
take the VS default "/Fd$(IntDir)vc$(PlatformToolsetVersion).pdb".

In the Makefile generators, set "/Fd" on the compile line to be
the directory containing object files (with a trailing slash the
compiler will add the "vc$(PlatformToolsetVersion).pdb" filename
automatically).  Drop the /Fd option from the exe link command
line and add "/pdb" instead (already done for dll linking).
Update these rules for both MSVC and Intel tools.

Drop support for PDB_OUTPUT_DIRECTORY and PDB_NAME in STATIC
libraries because the generated .pdb files are only from /Fd
and not real linker-generated .pdb files.  Update documentation to
clarify that the PDB_* properties are only for linker .pdb files.

This regresses the PDBDirectoryAndName test for STATIC libraries.
Since it is not clear at this time what should be done for STATIC
library .pdb files, comment out the relevant portion of the test
and leave a TODO comment.
2013-04-05 11:25:09 -04:00
Eric NOULARD f055c997a5 CPackRPM add /usr/lib64 to the list of builtin to-be-excluded path 2013-04-05 12:53:47 +02:00
Eric NOULARD bac5772b39 CPackRPM add mechanism to remove path from generated list of file in RPM spec.
This fixes bug #0013609, and is a possible solution to #0012864 as well.
The later will be completely fixed in another way. Both approaches
needs to be implemented because the current one is more automatic.

Inspired-By: Ari
2013-04-05 12:43:50 +02:00
Brad King 9cccd2c29c Merge topic 'usr-move-relocatable'
6c613b4 Handle usr-move without forcing absolute paths (#14041)
2013-04-04 14:20:21 -04:00
Brad King 6c613b433c Handle usr-move without forcing absolute paths (#14041)
In commit 0c727b90 (install(EXPORT): Force absolute paths for usr-move,
2013-03-08) and commit d4774140 (configure_package_config_file: force
absolute paths for usr-move, 2013-01-24) we supported Linux
distributions implementing the "/usr move" by assuming that installation
to (/usr)?/lib(64)? represents a non-relocatable system package.

When cross-compiling one may prepare a package for installation into a
system location on a target machine but install the package files on the
*host* machine inside another path for use with CMAKE_FIND_ROOT_PATH.
In this case the package development files must still be relocatable.

Handle "/usr move" with a new approach that works with relocatable
files.  Teach configure_package_config_file and install(EXPORT) to
generate special logic in a package configuration file or targets file
for installation under (/usr)?/lib(64)?.  Teach the file to recognize
when it is loaded through a symlink that refers to the same realpath as
its original install destination.  In such a case, use the original
install prefix.  Otherwise, compute the prefix relative to the current
file location to make it relocatable.
2013-04-03 11:19:47 -04:00
Clinton Stimpson bec8e64c73 Qt4: Fix typo setting a variable for FindThreads.
Fixes bug 14055.
2013-04-02 07:46:51 -06:00
Eric NOULARD 2ef908f911 Add support for componentized USER spec file
CPACK_RPM_USER_BINARY_SPECFILE can now be specified on a per-component
basis using CPACK_RPM_<componentName>_USER_BINARY_SPECFILE.

Inspired-By: Theodore Papadopoulo with its patch proposal.
2013-04-01 16:06:22 +02:00
Brad King 1c7833e7ae Merge topic 'ExactCaseReadmeTxt'
5479251 Modules/readme.txt: make lines a bit shorter for easier readability
140692d Modules/readme.txt: switch from "XXX" to "Xxx"
2013-03-28 10:42:24 -04:00
Brad King 9852d8f42b Merge topic 'use-java-INCLUDE_JARS'
8a2fca8 UseJava.cmake: require explicit request to include jars
2013-03-28 10:42:07 -04:00
Brad King 91461b48c8 Merge topic 'dev/add-isystem-for-clang'
4d668f3 Clang: Add -isystem flag support everywhere
2013-03-28 10:41:55 -04:00
Alex Neundorf 5479251b3b Modules/readme.txt: make lines a bit shorter for easier readability
This patch doesn't make them 79 characters long, but at least gets rid
of really long lines.  While at it, fix spelling of "relevant".

Alex
2013-03-28 10:39:14 -04:00
Alex Neundorf 140692d84c Modules/readme.txt: switch from "XXX" to "Xxx"
Using XXX as name of the package is ambiguous, since it can be
interpreted as "ALLUPPERCASE" and also as "ExactCase (if the name
is already ALLUPPERCASE)".
After extensive discussion there is the conclusion that ExactCase
is intended, so using a CamelCased name makes that more obvious.

Alex
2013-03-28 10:38:49 -04:00
Matthew Woehlke 81b5fb5b0d UseJava.cmake: fully use cmake_parse_arguments in add_jar
Modify add_jar to fully use named arguments, rather than cmake
variables, for specifying output names/directories, etc. For backward
compatibility, the old variables are still honored if set, although
named arguments will override them.
2013-03-28 10:36:33 -04:00
Matthew Woehlke 8a2fca8cd7 UseJava.cmake: require explicit request to include jars
Modify add_jar to (partly) use cmake_parse_arguments, and to require
using the named argument list INCLUDE_JARS to specify jar files (or jar
targets) to use as dependencies when creating a jar. This preserves the
ability to have such, while restoring the historic behavior that jar
files listed as sources are ignored. (The code now explicitly ignores
them, however, rather than adding them to an unused local variable, so
that it is more clear that nothing is being done with them.)
2013-03-28 10:35:42 -04:00
Ben Boeckel 4d668f3311 Clang: Add -isystem flag support everywhere
In GNU.cmake, -isystem is not used if APPLE is set. However, Clang has
pretty much always supported -isystem, so we should always use it.

In the future, GNU.cmake should do a version check to see if -isystem is
supported.
2013-03-28 10:32:24 -04:00
Bill Hoffman 118f741c49 ExternalProject: Retry on a failed git clone
Git sometimes fails to clone repositories due to network outage or
server load.  Try 3 times before giving up.
2013-03-26 10:31:39 -04:00
Brad King 36f158159b Merge topic 'FindImageMagick-v6.8.0-8'
dbd895b FindImageMagick: Search versioned suffixes (#14012)
2013-03-19 15:20:34 -04:00
Brad King b04b8ddfd8 Merge topic 'Ruby-version-selection'
d7e05e4 FindRuby: improve version selection
2013-03-19 15:20:30 -04:00
Brad King cc1c533163 Merge topic 'fix-java-jar-depends'
adeafad UseJava.cmake: accept jar targets in add_jar
53a05b8 UseJava.cmake: fix passing jars to add_jar
45c8e4b UseJava.cmake: simplify path logic
2013-03-19 15:20:22 -04:00
Rex Dieter dbd895b897 FindImageMagick: Search versioned suffixes (#14012)
The parent commit added suffixes for -Q8 and -Q16 but there may also be
versioned suffixes -6.Q8 and -6.Q16.
2013-03-18 16:37:50 -04:00
Rolf Eike Beer d7e05e4144 FindRuby: improve version selection
This will stop e.g. looking for a ruby1.9 executable first if "1.8 EXACT" was
given.
2013-03-18 20:17:08 +01:00
Brad King 526cbafa4e Merge topic 'findqt4-withqt5'
252bfd3 FindQt4: If Qt5 is in CMAKE_PREFIX_PATH, be sure to find Qt4 includes.
2013-03-18 09:42:06 -04:00
Brad King 68e86af6f7 Merge topic 'fix-FPHSA-match'
78e6217 FPHSA: Fix FOUND_VAR check to work with if() auto-dereference
2013-03-18 09:41:59 -04:00
Brad King 758651f124 Merge topic 'set-QT_MAJOR_VERSION'
4aa10cd FindQt4: Set the INTERFACE_QT_MAJOR_VERSION for Qt4::QtCore
2013-03-18 09:41:50 -04:00
Brad King bb260f0927 Merge topic 'set-Qt4_FOUND'
28d14f9 FindQt4: Set the Qt4_FOUND variable if Qt4 is found
2013-03-18 09:41:41 -04:00
Brad King a402bc4d5a Merge topic 'TI_DSP_to_TI'
27e6f6e TI compiler: add automatic detection of prefix and suffixes
b301586 rename TI_DSP toolchain to TI, since it works also for the ARM compiler
12b25df Determine C/CXX/Fortran compiler: fix indentation
7baa55a Determine C/CXX/Fortran compiler: minor restructuring
2013-03-18 09:41:37 -04:00
Brad King 253d7b6fe4 Merge topic 'FindCUDA.cmake/SeparableCompilation'
b6e9b8f FindCUDA: Use the PRE_LINK mode only for MSVC >= 10
2013-03-18 09:41:28 -04:00
Stephen Kelly 78e6217f31 FPHSA: Fix FOUND_VAR check to work with if() auto-dereference
Otherwise, it seems to match on the content of the variable.
2013-03-18 09:35:07 -04:00
Stephen Kelly 4aa10cd6d6 FindQt4: Set the INTERFACE_QT_MAJOR_VERSION for Qt4::QtCore
With a similar commit in Qt 5, this will error at CMake time if
an attempt is made to use

 target_link_libraries(foo Qt4::QtCore Qt5::Core)
2013-03-18 09:31:33 -04:00
Stephen Kelly 28d14f9f13 FindQt4: Set the Qt4_FOUND variable if Qt4 is found
Provide the old QT4_FOUND for compatibility.
2013-03-18 09:30:47 -04:00
Clinton Stimpson 252bfd3379 FindQt4: If Qt5 is in CMAKE_PREFIX_PATH, be sure to find Qt4 includes. 2013-03-18 09:06:53 -04:00
Alex Neundorf 27e6f6ef39 TI compiler: add automatic detection of prefix and suffixes
The TI cross compilers are named e.g. cl6x or armcl, the accompanying
strip and ar have the same prefixes/suffixes.

Alex
2013-03-14 21:48:09 +01:00
Alex Neundorf b3015862e5 rename TI_DSP toolchain to TI, since it works also for the ARM compiler
Additionally, look for a special ar and strip

Alex
2013-03-14 21:47:59 +01:00
Alex Neundorf 12b25df882 Determine C/CXX/Fortran compiler: fix indentation
Alex
2013-03-14 21:47:49 +01:00
Alex Neundorf 7baa55ac0b Determine C/CXX/Fortran compiler: minor restructuring
No functional changes, only change the way the if()-condition works,
to make it easier to add more cases.

Alex
2013-03-14 21:47:38 +01:00
Brad King 192ef7101e Merge topic 'aix-pic'
5c8c1d6 XL: Use -qpic for position independent code (#14010)
2013-03-14 10:00:35 -04:00
James Bigler b6e9b8f127 FindCUDA: Use the PRE_LINK mode only for MSVC >= 10
Use normal custom command dependencies by default.  Use the PRE_LINK
approach only to work around what seems to be a bug in msbuild handling
of custom build rules that chain together.
2013-03-14 09:57:15 -04:00
Matthew Woehlke adeafad488 UseJava.cmake: accept jar targets in add_jar
Modify add_jar to also accepts jars by target name.
2013-03-13 17:34:50 -04:00
Matthew Woehlke 53a05b8f51 UseJava.cmake: fix passing jars to add_jar
Fix setting classpath when encountering a jar argument to add_jar to
actually set the variable that is used to specify the classpath to
javac, instead of just uselessly appending the jar to
CMAKE_JAVA_INCLUDE_PATH (which is never used again at the point where it
is modified). Also, list jars so specified as dependencies of compiling
the java sources for the jar target.
2013-03-13 17:30:16 -04:00
Matthew Woehlke 45c8e4b181 UseJava.cmake: simplify path logic
Move logic to determine relative path to .java file to after the file
extension check, so that it only executes when it is actually used.
2013-03-13 17:29:14 -04:00
Brad King 5c8c1d624d XL: Use -qpic for position independent code (#14010)
According to XL C/C++ V9.0 documentation the default for -qpic/-qnopic
is platform-dependent.  It won't hurt to add the option on platforms
where it is the default, so always add it when we want position
independent code.
2013-03-13 13:49:48 -04:00
Brad King 18029b1e77 Merge topic 'findqt4-withqt5'
161a793 FindQt4: Fix QT_QMAKE{_QMAKE => }_EXECUTABLE typo
2013-03-13 13:37:26 -04:00
Brad King 8128940ac1 Merge topic 'cleanup-early-include-CTest-failure'
d90f49b CTest: Fail early without PROJECT_BINARY_DIR (#14005)
2e1c2bd build_command: Fail early without CMAKE_MAKE_PROGRAM (#14005)
4e5cb37 Refactor RunCMake.build_command test to allow more cases
2013-03-13 13:34:36 -04:00
Brad King edf200a50b Merge topic 'ExternalData-escape-semicolons'
1823ab4 ExternalData: Preserve escaped semicolons during argument expansion
2013-03-13 13:34:06 -04:00
Brad King 161a793781 FindQt4: Fix QT_QMAKE{_QMAKE => }_EXECUTABLE typo
The parent commit accidentally referenced QT_QMAKE_QMAKE_EXECUTABLE
which does not exist.  Use QT_QMAKE_EXECUTABLE instead.

Reported-by: m.hergarden@euphoria-it.nl
2013-03-13 07:54:36 -04:00
Brad King d90f49b894 CTest: Fail early without PROJECT_BINARY_DIR (#14005)
Do not use PROJECT_BINARY_DIR before it is defined.  If it is not
defined when needed, fail with an error message suggesting that the
project() command be invoked first.
2013-03-12 18:20:44 -04:00
Brad King 1823ab4d76 ExternalData: Preserve escaped semicolons during argument expansion
The CMake language implicitly flattens lists so a ";" in a list element
must be escaped with a backslash.  List expansion removes backslashes
escaping semicolons to leave raw semicolons in the values.  Teach
ExternalData_Add_Test and ExternalData_Expand_Arguments to re-escape
semicolons found in list elements so the resulting argument lists work
as if constructed directly by the set() command.

For example:

  ExternalData_Add_Test(Data NAME test1 COMMAND ... "a\\;b")
  ExternalData_Expand_Arguments(Data args2 "c\\;d")
  add_test(NAME test2 COMMAND ... ${args2})

should be equivalent to

  set(args1 "a\\;b")
  add_test(NAME test1 COMMAND ... ${args1})
  set(args2 "c\\;d")
  add_test(NAME test2 COMMAND ... ${args2})

which is equivalent to

  add_test(NAME test1 COMMAND ... "a;b")
  add_test(NAME test2 COMMAND ... "c;d")

Note that it is not possible to make ExternalData_Add_Test act exactly
like add_test when quoted arguments contain semicolons because the CMake
language flattens lists when constructing function ARGN values.  This
re-escape approach at least allows test arguments to have semicolons.

While at it, teach ExternalData APIs to not transform "DATA{...;...}"
arguments because the contained semicolons are non-sensical.

Suggested-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
2013-03-12 16:33:19 -04:00
Brad King 153242601e Merge topic 'findqt4-withqt5'
2112341 FindQt4: Do not use qmake from Qt5
2013-03-12 13:47:08 -04:00
Brad King 28490ecccb Merge topic 'aix-shared-flags'
bce7a2a AIX: Do not use -brtl to create shared libraries (#13997)
2013-03-12 13:47:04 -04:00
Brad King e58117b2ba Merge topic 'Win-HOST_SYSTEM_PROCESSOR'
20681c9 fix Windows processor detection
2013-03-12 13:46:27 -04:00
Brad King 2a3011b536 Merge topic 'FindCUDA.cmake/AddCUDA_cupti_LIBRARY'
c939b49 FindCUDA: Added cupti library.
2013-03-12 13:46:21 -04:00
Brad King 142357ac76 Merge topic 'FindCUDA.cmake/SeparableCompilation'
6a19150 FindCUDA: Add support for separable compilation
2013-03-12 13:46:17 -04:00
Brad King f0e93ce0e5 Merge topic 'FindCUDA.cmake/DontLinkAgainstCUDADriver'
3497bc2 FindCUDA: Remove linkage against CUDA driver library (#13084)
2013-03-12 13:46:13 -04:00
Brad King ff6038057b Merge topic 'FindImageMagick-v6.8.0-8'
5fe9855 FindImageMagick: Search quantum depth suffixes (#13859)
2013-03-12 13:46:10 -04:00
Janne Rönkkö 21123416b4 FindQt4: Do not use qmake from Qt5
Wihtout this, if qmake binary is from Qt5 the FindQt4 fails even though
the Qt4 version of qmake would be installed as qmake-qt4.

On Archlinux this is the case.

Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
2013-03-12 13:43:13 -04:00
James Bigler c939b4948c FindCUDA: Added cupti library.
In addition to adding the cupti library, find_local_library_first has
been renamed to cuda_find_local_library_first with a backward
compatibility macro to find_local_library_first.  Also added
cuda_find_local_library_first_with_path_ext to handle different paths.
2013-03-12 13:38:40 -04:00
James Bigler 6a19150b54 FindCUDA: Add support for separable compilation
This adds a new variable, CUDA_SEPARABLE_COMPILATION, and two new
functions, CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME and
CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS.

When CUDA_SEPARABLE_COMPILATION is specified then CUDA runtime objects
will be compiled with the separable compilation flag.  These object
files are collected in a target named variable that can be used in
CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME and
CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS.
2013-03-12 13:38:09 -04:00
James Bigler 3497bc2cee FindCUDA: Remove linkage against CUDA driver library (#13084)
The CUDA runtime library (libcudart) doesn't depend on the driver API
library (libcuda) and shouldn't be used to link CUDA run time codes.
2013-03-12 13:37:44 -04:00
Brad King bce7a2a3a5 AIX: Do not use -brtl to create shared libraries (#13997)
The flag was added incorrectly by commit 9c3a6eb4 (Need -brtl when creating
shared libraries, 2003-05-16).  According to "man ld" the -G option implies
"-brtl -bnortllib ...", -brtl implies "-brtllib", and -brtllib should only be
used for executables, not shared libraries.  Therefore it is incorrect and
unnecessary to specify -brtl explicitly after -G.

Reported-by: Kevin Burge <kcburge@gmail.com>
2013-03-11 09:01:27 -04:00
Rolf Eike Beer 20681c9e05 fix Windows processor detection
Thanks to Martin Koller for this.
2013-03-06 18:04:53 +01:00
Brad King e162d88fbb Merge topic 'GetPrerequisites-objdump'
12fb50d GetPrerequisites: Add documentation for objdump
8eb2fe9 GetPrerequisites: Enable test for BundleUtilities on MinGW
33c94c8 GetPrerequisites: Add support for objdump
5260a86 GetPrerequisites: Move tool search paths up
2013-03-04 15:40:24 -05:00
Brad King caf3f07b83 Merge topic 'non-fatal-Qt4-missing-targets'
4d5230d Only add existing targets to the Qt4 target depends properties.
2013-03-04 15:40:03 -05:00
Brad King 07ee97cace Merge topic 'Win-HOST_SYSTEM_PROCESSOR'
add8d22 properly detect processor architecture on Windows
2013-03-04 15:39:50 -05:00
Michael Tänzer 12fb50da9f GetPrerequisites: Add documentation for objdump
Signed-off-by: Michael Tänzer <neo@nhng.de>
2013-03-01 16:59:49 +01:00
Slava Sysoltsev 5fe9855624 FindImageMagick: Search quantum depth suffixes (#13859)
From ImageMagick's 6.8.0-8 changelog:

  http://www.imagemagick.org/script/changelog.php
  ABI is incompatible if quantum depth change.
  Add abi indication to library name.

Search for library names with -Q16 and -Q8 suffixes.

Reported-by: Evangelos Foutras <evangelos@foutrelis.com>
2013-03-01 08:09:28 -05:00
Michael Tänzer 33c94c82ba GetPrerequisites: Add support for objdump
Make it usable on MinGW without Visual Studio installed.

Signed-off-by: Michael Tänzer <neo@nhng.de>
2013-02-28 09:49:32 -05:00
Michael Tänzer 5260a864f5 GetPrerequisites: Move tool search paths up
Make them usable in the gp_tool selection heuristic.

Signed-off-by: Michael Tänzer <neo@nhng.de>
2013-02-28 09:48:11 -05:00
Stephen Kelly 4d5230d1d8 Only add existing targets to the Qt4 target depends properties.
Qt can be configured in ways which disable certain modules. Make
sure we don't fail on that.
2013-02-26 22:03:04 +01:00
Brad King 9d4394148a Merge topic 'FPHSA_FOUND_VAR_OPTION'
f17711c FPHSA: Convert FOUND_VAR failure test to RunCMake
c1f5780 FPHSA: improve documentation
7bb1abe FPHSA: Add FOUND_VAR option to specify _FOUND variable name
2013-02-25 13:12:05 -05:00
Brad King b887bca6ee Merge topic 'try_compile-targets'
236133e Handle targets in the LINK_LIBRARIES of try_compile.
1c0597c Add a new Export generator for IMPORTED targets.
f2ab17d Keep track of all targets seen while evaluating a genex.
2013-02-25 13:12:02 -05:00
Brad King 20d0b37f4a Merge topic 'generate-export-header-warnings'
1e0891e Removed GenerateExportHeader warnings about old compilers
2013-02-25 13:11:29 -05:00
Brad King 3044443b40 Merge topic 'fix-GEH-docs'
0ebf332 Fix GenerateExportHeader documentation #13936
2013-02-25 13:11:19 -05:00
Rolf Eike Beer add8d22acc properly detect processor architecture on Windows
CMake is usually run as a 32 bit process even on 64 bit Windows, so the
PROCESSOR_ARCHITECTURE environment variable would always return x86. This post
gives a description on how to do it properly:

http://blogs.msdn.com/b/david.wang/archive/2006/03/26/howto-detect-process-bitness.aspx
2013-02-25 16:14:36 +01:00
Stephen Kelly 236133e79e Handle targets in the LINK_LIBRARIES of try_compile.
Imported targets are re-exported so that they can be used by the
try_compile generated code with target_link_libraries.

This makes the use of the cmake_expand_imported_targets macro
obsolete. The macro is not able to expand the generator expressions
which may appear in the IMPORTED_LINK_INTERFACE_LIBRARIES content.
Instead it just sees them as 'not a target'.
2013-02-22 08:35:39 -05:00
Alex Neundorf c1f5780e2d FPHSA: improve documentation
Alex
2013-02-22 08:32:34 -05:00
Alex Neundorf 7bb1abe56a FPHSA: Add FOUND_VAR option to specify _FOUND variable name
In the new mode FPHSA now accepts a FOUND_VAR option, which can be set
either to ExactCase_FOUND or UPPERCASE_FOUND, no other values are
accepted.  Also add tests for that, including failure.

Alex
2013-02-22 08:31:00 -05:00
Marcus D. Hanwell 1e0891e28a Removed GenerateExportHeader warnings about old compilers
These warnings tend to flood the dashboard submissions, and it is doing
what it should (degrade gracefully with older compilers).
2013-02-20 11:48:12 -05:00
Stephen Kelly 0ebf332199 Fix GenerateExportHeader documentation #13936
There is no CMAKE_CURRENT_BUILD_DIR. CMAKE_CURRENT_BINARY_DIR is
the correct variable here.
2013-02-20 09:27:48 +01:00
Neil Carlson c26ac223df NAG: Use -PIC for Fortran position-independent code (#13932)
The Numerical Algorithms Group (NAG) Fortran compiler documents -PIC for
position-independent code.
2013-02-18 13:12:50 -05:00
Brad King e85f1c28d4 Merge topic 'rpath-use-implicit-link-dirs'
95a9c80 Merge topic 'LINK_LIBRARIES-property' into rpath-use-implicit-link-dirs
baa33ac AIX-GNU: Put implicit link directories in runtime libpath (#13909)
171b099 Avoid duplicate RPATH entries
2013-02-15 13:12:31 -05:00
Brad King ffdf57d9f5 Merge topic 'OpenMP-doc'
77fd5e5 FindOpenMP: improve documentation (#13895)
2013-02-15 13:12:21 -05:00
Brad King 3a393cb2da Merge topic 'Embarcadero-linker-flags'
188b0e9 Embarcadero: Fix default link stack/heap flags (#13912)
2013-02-15 13:11:54 -05:00
Brad King 0e2ed9b097 Merge topic 'linked-usage-cleanup'
fde949d Don't add target-specific interface includes and defines to Qt 4 targets.
79ae968 Revert "Add a way to exclude INTERFACE properties from exported targets."
71bf96e Revert "find_package: Reword <package>_NO_INTERFACES documentation"
3df36b5 Revert "Add the $<LINKED:...> generator expression."
e1f9080 Don't populate INTERFACE includes and defines properties in tll.
567c8d1 Revert "Don't allow utility or global targets in the LINKED expression."
a1c4905 Use the link information as a source of compile definitions and includes.
5c9f5e3 Don't use LINKED where not needed.
5b88504 Rename the IncludeDirectoriesEntry to be more generic.
b030323 Fix determination of when we're evaluating compile definitions.
2013-02-15 13:11:04 -05:00
Brad King 95a9c80cac Merge topic 'LINK_LIBRARIES-property' into rpath-use-implicit-link-dirs
Resolve a logical conflict in the signature of cmTarget::GetLinkClosure.
2013-02-14 10:18:31 -05:00
Brad King baa33acbda AIX-GNU: Put implicit link directories in runtime libpath (#13909)
The GNU compiler front-ends on AIX invoke the linker with flags of the
form "-L/path/to/gnu/runtime/lib" to tell ld where to find the language
runtime libraries.  They depend on the default libpath behavior
documented in "man ld" to add the -L paths also to the runtime libpath
so the dynamic loader can find the language runtime libraries.  This
differs from platforms whose linkers have distinct -rpath flags that
non-system compilers can use to tell the dynamic loader where to find
their language runtime libraries.

Since commit 96fd5909 (Implement linking with paths to library files,
2008-01-22) CMake always passes "-Wl,-blibpath:" followed by any
project-defined RPATH plus "/usr/lib:/lib" in order to explicitly set
the runtime libpath and avoid getting all the project -L paths in the
runtime libpath.  The explicit libpath prevents the GNU compiler runtime
library -L paths from being placed in the libpath and then the dynamic
loader fails to find the language runtime libraries.

CMake already detects the implicit link directories for each language
since commit 07ea19ad (Implicit link info for C, CXX, and Fortran,
2009-07-23).  Add the implicit link directories to the explicit runtime
libpath for GNU compilers on AIX to fix this use case.
2013-02-14 10:16:36 -05:00
Rolf Eike Beer 77fd5e51ab FindOpenMP: improve documentation (#13895) 2013-02-13 19:38:00 +01:00
Brad King 188b0e9e37 Embarcadero: Fix default link stack/heap flags (#13912)
Since commit c70beb4b (change the default borland stack size, 2003-05-05),
commit 1b572eb9 (remove -H flags, 2003-05-08), and commit 2d411398 (Stack size
in generated programs should be 10 meg, 2003-06-12) CMake adds link flags to
select a 10MB stack.  At the time this was for consistency with our behavior on
MS, but that was recently removed by commit 51af1da3 (Remove "/STACK:10000000"
from default linker flags, 2012-11-23).

Change our Embarcadero link flags to select the default stack and heap settings
according to the compiler documentation.  This is more reliable than leaving
the flags out completely as it has been reported that the linker does not
always use its documented defaults.

Suggested-by: Mathäus Mendel <contato@mathausmendel.com>
2013-02-13 13:35:25 -05:00
Stephen Kelly fde949d143 Don't add target-specific interface includes and defines to Qt 4 targets.
This is a partial revert of commit c8ee07d0 (FindQt4: Add INTERFACE
includes and defines to Qt4 targets, 2012-12-31).
2013-02-13 15:12:31 +01:00
Brad King f0c4d37ff3 Merge topic 'EclipseDetectClangIncludeDirs'
a396b6e Eclipse: also detect include dirs and macro for clang (#13823)
2013-02-12 14:42:18 -05:00
Brad King 17a6d3c36f Merge topic 'CPackRPM-fixSomeRPMSpecificVarHandling'
9be3da1 CPackRPM fix #13898 uses IF(DEFINED var) to avoid wrong var value logic
2013-02-12 14:42:06 -05:00
Brad King 813b519280 Merge topic 'minor-fixes'
ba48e63 Generate config-specific interface link libraries propeties.
deb51a7 Remove unused forward declarations.
9712362 Don't allow utility or global targets in the LINKED expression.
faa927e Make sure INTERFACE properties work with OBJECT libraries.
510fdcb Whitelist target types in target_{include_directories,compile_definitions}
4de7178 Ensure that the build interface includes have been added.
df74bc3 Only append build interface include dirs to particular targets.
d4e5c67 Don't keep track of content determined by target property values.
1fb545a Move a special case for PIC from the genex to the cmTarget code.
57175d5 Only use early evaluation termination for transitive properties.
4cf161a Fix determination of evaluating link libraries.
3a298c0 Fix generation of COMPILE_DEFINITIONS in DependInfo.cmake.
655e98b Ensure type specific compatible interface properties do not intersect.
46e2896 The COMPATIBLE_INTERFACE does not affect the target it is set on.
5f926a5 Test printing origin of include dirs from tll().
7c0ec75 De-duplicate validation of genex target names.
...
2013-02-11 13:59:48 -05:00
Alex Neundorf a396b6ece2 Eclipse: also detect include dirs and macro for clang (#13823)
Alex
2013-02-10 18:58:27 +01:00
Eric NOULARD 9be3da1c80 CPackRPM fix #13898 uses IF(DEFINED var) to avoid wrong var value logic 2013-02-09 13:42:05 +01:00
Stephen Kelly ba48e63f1e Generate config-specific interface link libraries propeties.
All other properties we generate are config-specific, so it makes
sense to do so here too.
2013-02-09 10:25:35 +01:00
Brad King 7dab997771 Merge topic 'generator-toolset'
56ca8d4 Tests: Add generator toolset support
f36c665 Tests: Consolidate ctest --build-and-test generator options
c0debb1 Merge branch 'master' into generator-toolset
daae0d2 ExternalProject: Propagate the generator toolset
e3841cf CTest: Add options to set generator toolset
f980a80 Xcode: Implement generator toolset selection (#9831, #13802)
650c647 VS: Implement generator toolset selection (#10722, #13774)
4fd5342 CMake: Add -T option to choose a generator toolset
118c32f Merge branch 'xcode-duplicate-flags-13354' into generator-toolset
cf8645e Tests: Run ctest custom commands with VERBATIM
5b2fba5 ExternalProject: Simplify CMake command line generation
2013-02-08 13:38:56 -05:00
Brad King 2cd362d191 Merge topic 'CMAKE_CL_64-CXX'
fe664b5 MSVC: Fix CMAKE_CL_64 in CXX-only projects (#13896)
2013-02-08 13:38:48 -05:00
Brad King 98cca40d9b Merge topic 'implicit-lib-canonical-path'
10e8b2d Normalize full paths in implicit link library list
2013-02-08 13:38:10 -05:00
Brad King fe664b5d1d MSVC: Fix CMAKE_CL_64 in CXX-only projects (#13896)
When CXX is enabled without C then MSVC_CXX_ARCHITECTURE_ID is set
instead but not MSVC_C_ARCHITECTURE_ID.  Test both.
2013-02-07 15:04:06 -05:00
Brad King c0debb1f89 Merge branch 'master' into generator-toolset
We need the latest Tests/CMakeLists.txt so we can refactor all tests.
2013-02-07 11:09:01 -05:00
Brad King daae0d2f5b ExternalProject: Propagate the generator toolset
When the CMAKE_GENERATOR option is given to ExternalProject_Add, look
also for option CMAKE_GENERATOR_TOOLSET to select the value of the cmake
"-T" command-line flag.  When no CMAKE_GENERATOR option is given
explicitly then use the current project's CMAKE_GENERATOR_TOOLSET (since
we already use its CMAKE_GENERATOR).
2013-02-07 11:08:33 -05:00
Brad King f980a80495 Xcode: Implement generator toolset selection (#9831, #13802)
Implement generator toolset selection (cmake -T) for Xcode > 2.0 by
adding the GCC_VERSION build setting to project files.
2013-02-07 11:07:48 -05:00
Brad King 10e8b2da37 Normalize full paths in implicit link library list
Teach CMakeParseImplicitLinkInfo to convert implicit link library full
paths to a canonical form.  This makes them more reproducible in case
different language compiler front-ends add the same library by different
paths e.g. ".../libA.a" and "...//libA.a".

Add a case to the CMake.ImplicitLinkInfo test to cover removal of extra
slashes from both library and directory paths.
2013-02-06 16:22:02 -05:00
Brad King 020525845a Merge topic 'add-ExternalData-module'
5484c60 Merge branch 'vs6-rule-files' into add-ExternalData-module
1fd8d01 ExternalData: Attach download rules to content links in IDEs
a6d3ffc Fix Module.ExternalData test on VS 6
aed590a Fix Module.ExternalData test on Cygwin
06e8ded Merge branch 'fix-atomic-rename-on-Windows' into add-ExternalData-module
e2e0d2e ExternalData: Collapse ../ components in DATA{} paths
ee2abfd ExternalData: Add support for SHA 1 and 2 hash algorithms
aa8b228 ExternalData: Generalize hash algo/ext handling
9e518a8 ExternalData: Allow DATA{} syntax to reference directories
175ed02 ExternalData: Allow ()-groups in series match regex
4befecc ExternalData: Add tests covering interfaces and errors
bcd2580 ExternalData: Improve series matching using an explicit syntax
c0cebcb ExternalData: Remove unused private interface
5275993 ExternalData: Cleanup stray TODO and typo in comments
7bb8344 ExternalData: Do not match directory names when resolving DATA{}
00d801f ExternalData: Remove compatibility with CMake < 2.8.5
...
2013-02-05 14:46:40 -05:00
Brad King 1fd8d017e6 ExternalData: Attach download rules to content links in IDEs
Each data file to be created in the build tree corresponds one-to-one with
a raw file or content link in the source tree.  Use the MAIN_DEPENDENCY of
add_custom_command to attach the build rule to the source tree file.  This
looks much nicer in the IDE project file browser and avoids ".rule" files.
2013-02-04 15:20:03 -05:00
Patrick Gansterer fd2a0d58c5 Set WINCE to 1 when building for WindowsCE
Introduce a new variable WINCE to make the WindowsCE
system more easy to use in if statements.
2013-02-01 23:26:03 +01:00
Brad King 118c32f8f2 Merge branch 'xcode-duplicate-flags-13354' into generator-toolset 2013-01-31 09:58:50 -05:00
Brad King 5b2fba5d40 ExternalProject: Simplify CMake command line generation
Append the source directory to the command line option in a separate
step instead of duplicating it with each possible generator.
2013-01-31 09:58:05 -05:00
Brad King e2e0d2e3c7 ExternalData: Collapse ../ components in DATA{} paths
Relative path components need to be normalized out even if they appear
in the middle of a caller-supplied string.
2013-01-30 14:55:12 -05:00
Brad King ee2abfdc89 ExternalData: Add support for SHA 1 and 2 hash algorithms
Update the Module.ExternalData and RunCMake.ExternalData tests to cover
some of them.
2013-01-30 10:05:07 -05:00
Brad King aa8b2288d3 ExternalData: Generalize hash algo/ext handling
Use private global variables _ExternalData_REGEX_(ALGO|EXT) to match the
possible hash algorithm names and extensions in regular expressions.
Use "file(<algo>)" instead of "cmake -E md5sum" to compute hashes
without a child process and to support more hash algorithms.
2013-01-30 10:05:07 -05:00
Brad King 9e518a8169 ExternalData: Allow DATA{} syntax to reference directories
Use a trailing slash to reference a directory.  Require that a list
of associated files be specified to select from within the directory.
One may simply use DATA{Dir/,REGEX:.*} to reference all files but
get a directory passed on the command line.
2013-01-30 10:05:07 -05:00
Brad King 175ed02207 ExternalData: Allow ()-groups in series match regex
Refactor use of the ExternalData_SERIES_MATCH value to avoid assuming
that it has no ()-groups that interfere with group indexing.

Extend the Module.ExternalData test to cover this case.
2013-01-30 10:05:07 -05:00
Brad King bcd25808ac ExternalData: Improve series matching using an explicit syntax
Automatic series recognition can generate false positives too easily
when the default series configuration is flexible enough to handle
common cases.  Avoid false positives by requiring an explicit syntax to
activate series recognition.  Choose the syntax DATA{<name>,:} to be
short, simple, and look like a vertical ellipsis.

This allows us to improve the default series match configuration.  Allow
series references to contain one of the numbered file names.  Allow '-'
as a separator in addition to '.' and '_'.  Document what the default
configuration matches.  Also provide more options to configure series
<name> parsing.
2013-01-29 15:23:00 -05:00
Brad King 7931d35193 Merge topic 'FindGTK2-lib-order'
399c3b8 FindGTK2: Fix GTK2_LIBRARIES order for static gtk libraries
2013-01-29 14:52:27 -05:00
Brad King c0cebcb19a ExternalData: Remove unused private interface
The 'store' action was part of an older design and is no longer needed.
Remove it.
2013-01-28 15:31:31 -05:00
Brad King 52759930bd ExternalData: Cleanup stray TODO and typo in comments
Remove an outdated TODO line left from earlier designs.
Also fix a typo.
2013-01-28 15:31:31 -05:00
Brad King 7bb8344d50 ExternalData: Do not match directory names when resolving DATA{}
Our content link and object download infrastructure supports only
blobs (files), not trees (directories).  Do not allow references
to end in a slash.
2013-01-28 15:31:02 -05:00
Rodolfo Schulz de Lima 399c3b8e54 FindGTK2: Fix GTK2_LIBRARIES order for static gtk libraries
Before this, when creating GTK2_LIBRARIES, FindGTK2 added the GTK
dependencies in wrong order into GTK2_LIBRARIES.  With dynamic libraries
this is not a major problem, but when linking to static gtk libraries,
the linker outputs a lot of undefined symbols.  Reorder the calls that
append libraries to GTK2_LIBRARIES to respect dependency order.
2013-01-28 08:48:36 -05:00
Alex Neundorf 4cad848369 configure_package_config_file(): extend documentation
Alex
2013-01-24 21:27:32 +01:00
Alex Neundorf 37c4bc1f86 configure_package_config_file(): fix indentation
This is a separate commit, so that the previous commit is smaller.

Alex
2013-01-24 21:18:47 +01:00
Alex Neundorf d4774140b7 configure_package_config_file: force absolute paths for usr-move
The configure_package_config()_file() macro will now use
absolute paths for the PATH_VARS if the Config.cmake file
will be installed into /lib(64) or /usr/lib(64), since due to
the usr-move filesystem changes Config.cmake files installed
there may be found via two paths (once per symlink via
/lib(64) and once via /usr/lib ), and in this case
relative paths break.

Alex
2013-01-24 21:15:58 +01:00
Brad King 00d801fbfe ExternalData: Remove compatibility with CMake < 2.8.5
Now that the module comes in a sufficiently new CMake it does not need
to support older versions.
2013-01-24 13:34:12 -05:00
Brad King ab26249db1 Add ExternalData module
Take files we previously distributed in ITK 4.3.1:

  CMake/ExternalData.cmake
  CMake/ExternalData_config.cmake.in

and add them for distribution in upstream CMake.  Update the copyright
notice block format to follow CMake conventions.
2013-01-24 13:32:17 -05:00
Brad King a37b0e3ebf Merge topic 'qt4-autolink-qtmain'
e3b5eb6 Automatically link to the qtmain library when linking to QtCore.
6c8d8af Add the $<TARGET_POLICY> expression
2013-01-23 15:11:24 -05:00
Stephen Kelly e3b5eb6b23 Automatically link to the qtmain library when linking to QtCore.
When using QAxServer, ensure that the qtmain library is excluded
by reporting an error at CMake time if it is not.
2013-01-23 14:15:41 -05:00
Brad King c0f1af926f ExternalProject: Allow DEPENDS on normal targets (#13849)
The ExternalProject_Add DEPENDS option adds two types of dependencies.
It adds a target-level build order dependency between the external
project target and the named targets.  It also adds a file-level
dependency on the "done" stamp file of the named external project
targets.  Targets not created by ExternalProject_Add have no such stamp
file and no _EP_STAMP_DIR property.  Prior to commit d14c0243 (Refactor
repeated code into function, 2012-04-26) we unconditionally accepted an
empty stamp dir and generated a dependency on a non-existent file.
After that commit we generate an error that no stamp dir is set.

Skip the file-level dependency when the named dependency is not an
external project target in order to allow this use case.  Teach the
ExternalProject test to cover the case.
2013-01-16 10:35:58 -05:00
Brad King feb9ffb681 Merge topic 'qt4-target-depends'
c8ee07d FindQt4: Add INTERFACE includes and defines to Qt4 targets
2013-01-10 10:22:40 -05:00
Brad King 42d9df9f4f Merge topic 'Haiku'
0380f36 FindOpenGL: add Haiku paths
8e9630c FindGLUT: BeOS does not have libXi and libXmu
50bfedf FindLua51: do not try to link libm on BeOS
3d2e6a0 check for Haiku only with __HAIKU__
7a1b961 Haiku no longer defines __BEOS__
ed96d9a bootstrap: use better defaults for Haiku
2013-01-10 10:22:14 -05:00
Stephen Kelly c8ee07d0ad FindQt4: Add INTERFACE includes and defines to Qt4 targets 2013-01-10 09:44:50 -05:00
Brad King bc414aebaf Merge topic 'qt4-version-openssl'
4b9ec00 FindQt4: set QT_VERSION_* variables sooner.
2013-01-08 14:32:22 -05:00
Rolf Eike Beer 0380f36cd8 FindOpenGL: add Haiku paths
Also check the HP-UX specific paths only when on HP-UX.
2013-01-08 00:39:53 +01:00
Rolf Eike Beer 8e9630c719 FindGLUT: BeOS does not have libXi and libXmu 2013-01-07 23:57:07 +01:00
Rolf Eike Beer 50bfedf391 FindLua51: do not try to link libm on BeOS
This includes Haiku, which currently is treated as BeOS. The ComplexOneConfig
test already knew about this.
2013-01-07 23:26:18 +01:00
Rolf Eike Beer 3d2e6a0687 check for Haiku only with __HAIKU__ 2013-01-07 21:52:45 +01:00
Rolf Eike Beer 7a1b961de8 Haiku no longer defines __BEOS__ 2013-01-07 21:20:11 +01:00
Brad King c2cde7f104 Merge topic 'osx-implicit-link-dirs'
cc676c3 OS X: Detect implicit linker framework search paths
2dd67c7 OS X: Detect implicit link directories on modern toolchains
ba58d0c OS X: Link with all framework search paths, not just the last
2013-01-07 14:23:04 -05:00
Brad King 0a097af097 Merge topic 'qt4-target-depends'
57a67bf Qt4: Add module dependencies to the IMPORTED targets
2013-01-07 14:19:36 -05:00
Stephen Kelly 57a67bf27e Qt4: Add module dependencies to the IMPORTED targets
This means for example, that consumers can use:

 target_link_libraries(foo ${QT_QTGUI_LIBRARIES})

instead of also needing to specify all 'public' dependencies:

 target_link_libraries(foo ${QT_QTGUI_LIBRARIES} ${QT_QTCORE_LIBRARIES} )

when using the IMPORTED targets.  Also populate the
IMPORTED_LINK_DEPENDENT_LIBRARIES property so CMake can help the linker
find shared library dependencies.
2013-01-07 14:00:47 -05:00
Clinton Stimpson 4b9ec00d0e FindQt4: set QT_VERSION_* variables sooner.
Set QT_VERSION_* variables sooner so they can be set before
Qt4ConfigDependentSettings.cmake uses them.
2013-01-07 11:06:35 -07:00
Brad King de34995d18 Merge topic 'FixSDLSearchPaths'
fb864d6 FindSDL_...: Restore dropped search paths (#13819)
2013-01-03 13:53:27 -05:00
Benjamin Eikel fb864d6e03 FindSDL_...: Restore dropped search paths (#13819)
Restore the search paths that were accidentally dropped by me in commit
9ed24c53. This was already fixed for FindSDL.cmake in commit 7cb51739.
2012-12-30 16:13:51 +01:00
Eric LaFranchi 3793dca08a CPack: WIX Product Icon, UI Banner, UI Dialog support (#13789) 2012-12-28 15:32:15 -05:00
Brad King cc676c3a08 OS X: Detect implicit linker framework search paths
Previously we hard-coded a list of implicit framework directories but
did not account for CMAKE_OSX_SYSROOT or for changes to the list across
OS X versions.  Instead we should automatically detect the framework
directories for the active toolchain.

The parent commit added the "-Wl,-v" option to ask "ld" to print its
implicit directories.  It displays a block such as:

 Framework search paths:
	/...

Parse this block to extract the list of framework directories.

Detection may fail on toolchains that do not list their framework
directories, such as older OS X linkers.  Always treat the paths

 <sdk>/Library/Frameworks
 <sdk>/System/Library/Frameworks
 <sdk>/Network/Library/Frameworks # Older OS X only
 /System/Library/Frameworks

as implicit.  Note that /System/Library/Frameworks should always be
considered implicit so that frameworks CMake finds there will not
override the SDK copies.
2012-12-11 15:15:52 -05:00
Brad King 2dd67c7ea0 OS X: Detect implicit link directories on modern toolchains
We detect the implicit link directories for the toolchain by adding a
flag to get verbose output from the compiler front-end while linking the
ABI detection binary.  Newer OS X toolchains based on Clang do not add
the implicit link directories with -L options to their internal
invocation of "ld".  Instead they use a linker that comes with the
toolchain and is already configured with the proper directories.

Add the "-Wl,-v" option to ask "ld" to print its implicit directories.
It displays them in a block such as:

 Library search paths:
	/...

Parse this block to extract the implicit link directories.

While at it, remove the checks introduced by commit efaf335b (Skip
implicit link information on Xcode, 2009-07-23) and commit 5195a664
(Skip implicit link info for multiple OS X archs, 2009-09-22).  Discard
the non-system link directories added by Xcode.  Discard all detected
implicit libraries in the multi-architecture case but keep the
directories.  The directories are still useful without the libraries
just to suppress addition of explicit -L options for them.
2012-12-11 15:15:51 -05:00
David Cole 3d0f1957d1 Merge topic 'ConfigHelperMinorCommentFix'
8039bd0 CONFIGURE_PACKAGE_CONFIG_FILE(): improve generated comments
2012-12-11 13:43:59 -05:00
David Cole d73c4057ed Merge topic 'OpenBSD-patches'
f80ccac OpenBSD: Add paths for Qt3/Qt4
2012-12-11 13:43:36 -05:00
Alex Neundorf 8039bd0864 CONFIGURE_PACKAGE_CONFIG_FILE(): improve generated comments
CONFIGURE_PACKAGE_CONFIG_FILE() now additionally generates
"Any changes to this file will be overwritten by the next CMake run
The input file was FooConfig.cmake.in"
into the configured file.

Alex
2012-12-06 22:24:43 +01:00
Amit Kulkarni f80ccac158 OpenBSD: Add paths for Qt3/Qt4
Handle OpenBSD specific paths in Qt3/Qt4, allowing concurrent building
and installation.  Some common programs are renamed with suffixes of
either 3 or 4.  Also, allow qt3/qt4 installed under /usr/local to be
searched and recognized appropriately.
2012-12-05 13:09:43 -05:00
David Cole 2bb2745fa8 Merge topic 'fix-11575-add-wix-support-to-cpack'
a74bd47 CPack: Fix dashboard errors and warnings (#11575)
ad0f735 CPack: Fix dashboard warnings (#11575)
0729ad4 CPack: Fix dashboard errors (#11575)
85baac1 CPack: Add a WiX Generator (#11575)
2012-12-05 10:31:05 -05:00
David Cole 799befa215 Merge topic 'OpenBSD-patches'
2f49b71 OpenBSD: Add path for Lua 5.1
4a015f7 OpenBSD: Add paths for Tcl/Tk 8.4/8.5
51c1119 OpenBSD: Add path for Freetype under X.org
6e7a345 OpenBSD: Add paths for Java 1.6.0/1.7.0 JRE/JDK
288f75e OpenBSD: Install shared libraries without executable permission
2012-12-05 10:30:56 -05:00
David Cole 7b910c0066 Merge topic 'qt4-include-as-system'
691ac05 Qt4: Add SYSTEM option to include_directories.
2012-12-05 10:30:40 -05:00