Commit Graph

5069 Commits

Author SHA1 Message Date
Brad King 04fc5dd493 Merge topic 'OpenBSD-paths'
bd32b682 OpenBSD: honor the LOCALBASE and X11BASE environment variables
2014-05-22 10:37:46 -04:00
Brad King 99d718c51d Merge topic 'FindQt_versioned_tools'
0645eedb FindQt[34]: Prefer matching versioned tool names
2014-05-22 10:37:45 -04:00
Rolf Eike Beer 0645eedb71 FindQt[34]: Prefer matching versioned tool names
After finding qmake we search in QT_BINARY_DIR for the other Qt tools.
Try all versioned executable names before trying the plain executable name.
This makes it much more likely that if 2 different major versions are installed
in the same prefix CMake will be able to detect a proper set of tools.
2014-05-22 08:56:05 -04:00
Rolf Eike Beer bd32b682f2 OpenBSD: honor the LOCALBASE and X11BASE environment variables 2014-05-21 20:38:55 +02:00
Brad King 04a0e5ff14 Merge topic 'clang-features'
cda23319 Features: Record for Clang 3.4
2014-05-21 10:31:54 -04:00
Brad King 20a32a4b72 Merge topic 'GNUInstallDirs-OpenBSD'
d4fdd9c1 GNUInstallDirs: use the proper default for info and man paths on OpenBSD
2014-05-21 10:31:52 -04:00
Brad King 7e62353a4c Merge topic 'OpenBSD_no_multilib'
956b7190 OpenBSD: disable FIND_LIBRARY_USE_LIB64_PATHS
2014-05-21 10:31:50 -04:00
Rolf Eike Beer 956b719087 OpenBSD: disable FIND_LIBRARY_USE_LIB64_PATHS
OpenBSD has no multilib paths.
2014-05-20 18:36:34 +02:00
Rolf Eike Beer d4fdd9c189 GNUInstallDirs: use the proper default for info and man paths on OpenBSD 2014-05-20 18:14:10 +02:00
Stephen Kelly 0dffbb93de Features: Ensure that list exists to remove from. 2014-05-20 16:42:54 +02:00
Stephen Kelly cda233194f Features: Record for Clang 3.4
Clang 3.4 supports all features currently known to CMake.
2014-05-20 16:03:48 +02:00
Brad King d01320d4b7 Merge topic 'preserve_cmake_minimum_required_version'
1890c668 Keep cmake_minimum_required calls in sync with current version
81a3f228 Do not change minimum required version in modules
2014-05-20 09:40:16 -04:00
Brad King c1edede31f Merge topic 'compile-features-C-language'
e0890d03 Features: Extend concept to C language.
2014-05-20 09:40:14 -04:00
Daniele E. Domenichelli 1890c668e9 Keep cmake_minimum_required calls in sync with current version
Update cmake_minimum_required calls in CMakeLists.txt in Modules and in
CMakeLists.txt generated by other modules, so that they are always in
sync with current CMake version.
2014-05-19 16:55:12 +02:00
Daniele E. Domenichelli 81a3f22882 Do not change minimum required version in modules
Some modules change CMake minimum required version when they are
included. For example:

  cmake_minimum_required(VERSION 2.8.12)
  message("${CMAKE_MINIMUM_REQUIRED_VERSION}")
  include(CheckTypeSize)
  message("${CMAKE_MINIMUM_REQUIRED_VERSION}")

will produce the following output:

  2.8.12
  2.6

This patch ensures that when you include a CMake module the minimum
required version and the policies set are left unchanged.

Fixes Issue #14864
2014-05-19 16:55:12 +02:00
Brad King 7019152aa2 Merge topic 'FindCUDA-separable-compilation-flags'
6ad14c71 FindCUDA: Use CUDA_NVCC_FLAGS* for separable compilation
2014-05-19 10:40:24 -04:00
James Bigler 6ad14c71bb FindCUDA: Use CUDA_NVCC_FLAGS* for separable compilation
Previously when linking the intermediate link file for separable compilation
the CUDA_NVCC_FLAGS* were not used.  This caused tremendous confusion when
using this feature, and I consider it to be a bug.  This change should fix
this.
2014-05-19 09:14:15 -04:00
Stephen Kelly f6f1095413 Features: Use the features symbol in the feature-test compile.
Clang discards the entire string if it is not used, removing
the ability to read the features from the compiled binary. That
is prevented by using the symbol.

GNU with -O3 also discards the string, so use the string in a
way which is determined by a runtime value (argc) to prevent
it being discarded.
2014-05-15 19:38:25 +02:00
Stephen Kelly e0890d03a4 Features: Extend concept to C language.
Add properties and variables corresponding to CXX equivalents.

Add features for c_function_prototypes (C90), c_restrict (C99),
c_variadic_macros (C99) and c_static_assert (C11). This feature
set can be extended later.

Add a <PREFIX>_RESTRICT symbol define to WriteCompilerDetectionHeader
to conditionally represent the c_restrict feature.
2014-05-15 00:15:18 +02:00
Stephen Kelly 5c04dfe465 Features: Only require AppleClang policy to be NEW on APPLE. 2014-05-14 23:55:34 +02:00
Brad King 2e347eb183 Merge topic 'WriteCompilerDetectionHeader-module'
62a4a67d Add the WriteCompilerDetectionHeader module.
2014-05-14 13:58:30 -04:00
Stephen Kelly 62a4a67dc5 Add the WriteCompilerDetectionHeader module.
Provide a function to write a portable header to detect compiler
features.  Generate a preprocessor #error for unknown compilers
and compiler versions whose features are not yet recorded.  This
error condition might be relaxed in the future, but for now it
is useful for verification of expectations.
2014-05-14 13:57:30 -04:00
Rolf Eike Beer 293bcf7a60 FindGTest: use new add_test() signature (#14913)
This allows to use target names as executables.
2014-05-12 18:21:37 +02:00
Brad King e506f1f16e Merge topic 'features-gnu-oldest-supported'
f782417b Features: Record the oldest supported compiler.
2014-05-12 09:31:08 -04:00
Stephen Kelly e2f09aff12 CMakeConfigurableFile: Remove excess newline. 2014-05-10 09:07:05 +02:00
Stephen Kelly 5109b0428d Features: Fix GNU 4.8.1 version test. 2014-05-10 08:58:49 +02:00
Stephen Kelly f5bf9d4311 Tests: Make CompileFeature tests use highest standard known.
Remove the use of check_cxx_source_compiles which is now just getting in
the way.

Blacklist the cxx_alignof feature in the test with GNU 4.7. The test
file compiles, but it is documented as available first in GNU 4.8.
2014-05-09 14:39:30 +02:00
Ben Boeckel e423f1c05d Windows: Avoid () in environment variable references
Use nested variable evaluation instead.
2014-05-08 13:24:49 -04:00
Stephen Kelly f782417b8c Features: Record the oldest supported compiler.
This may be used to ensure that features are reported correctly
only if the compiler minimum version is met.
2014-05-08 18:02:14 +02:00
Brad King f1d504d6cd Merge topic 'GNU-4.7-features'
9cbc63e4 Features: Record for GNU 4.7.
2014-05-08 11:28:03 -04:00
Brad King 3e206022ab Merge topic 'minor-cleanups'
47795421 Fix whitespace in docs.
aa283b6b Features: Fix test for GNU 4.8.1.
bbfd4cd4 Features: Include the language of the compiler in error messages.
2014-05-08 11:27:57 -04:00
Brad King 9add7071a5 Merge topic 'hp-cpp98-tests'
b0f277db HP aCC: record compiler flag for Ansi C++98 support for version 3.80 onwards
2014-05-08 11:27:55 -04:00
Brad King 7b3def93b6 Merge topic 'decay-language-version'
205215fb cmTarget: Add CXX_STANDARD_REQUIRED to control decay.
1df2116b Features: Decay language flag if requested is not available.
c4f4dac2 Project: Fix exit-on-error with compile feature tests.
5bb7ce72 Project: Use nullary form of main for compile feature tests.
64254e7a Project: Remove extern from static string in feature tests.
0d9c99bf Help: Fix order of help entries.
dc7639bd Tests: Fix name of cache variable.
2014-05-08 11:27:53 -04:00
Brad King 6eafe843ca Merge topic 'compiler-id-refactor'
3b59f8b7 Project: Refactor C compiler determination into multiple files.
8896501b CompilerId: Allow specifying a prefix for preprocessor defines.
23f451bb CompilerId: Guard the platform-default compiler code with a parameter.
30a99f5c CompilerId: Add option to generate compiler-id-specific defines.
36ed5894 CompilerId: Allow specifying the compiler-specific components to generate.
9a083bce Project: Split the compiler id detection into a separate function.
9d285600 Project: Generate the CXX compiler Id test from multiple files.
2014-05-08 11:27:51 -04:00
Brad King d02e58c470 Merge topic 'ncurses-tinfo'
1f646c6c FindCurses: Detect and satisfy ncurses dependency on tinfo
0e4a2c7e FindCurses: Honor CURSES_NEED_NCURSES when curses is found
2014-05-08 11:27:49 -04:00
Stephen Kelly 9cbc63e40c Features: Record for GNU 4.7.
Update the CompileFeatures test to verify that unsupported features
do not work.
2014-05-07 22:02:02 +02:00
Brad King ff95e44264 Merge topic 'compiler-id-comment'
c7ddd409 Project: Clarify comment about platform-native compilers.
2014-05-07 09:23:59 -04:00
Brad King 2e095099ec Merge topic 'osx-iframework'
1bed75a5 OS X: Use -iframework for system framework directories
2014-05-07 09:13:37 -04:00
Brad King 3e2e15eead Merge topic 'xcode-sdkroot'
5dfe9b7d Xcode: Find fallback SDK if one matching the OS version doesn't exist.
2014-05-07 09:13:35 -04:00
Brad King 623fcc2972 Merge topic 'InstallRequiredSystemLibraries-vs12-mfc'
c0a6646d InstallRequiredSystemLibraries: MBCS MFC is optional on VS 12 (#14903)
2014-05-07 09:13:32 -04:00
Brad King b4479ec0b9 Merge topic 'ExternalProject_labels'
93730bb3 ExternalProject: Set FOLDER property to targets
39ef8046 ExternalProject: Set LABELS property to targets
2014-05-07 09:13:30 -04:00
Mikołaj Siedlarek 1bed75a590 OS X: Use -iframework for system framework directories
Just like -I flag has its -isystem counterpart which marks an include
directory as a system directory and prevents unwanted warnings, on Apple
systems there is -iframework -- a system directory replacement for -F.
Use this flag to implement include_directories(SYSTEM) for frameworks.
2014-05-07 09:04:48 -04:00
Stephen Kelly 3b59f8b7c6 Project: Refactor C compiler determination into multiple files. 2014-05-07 14:28:36 +02:00
Stephen Kelly 8896501b23 CompilerId: Allow specifying a prefix for preprocessor defines. 2014-05-07 14:00:01 +02:00
Stephen Kelly 23f451bb33 CompilerId: Guard the platform-default compiler code with a parameter. 2014-05-07 14:00:00 +02:00
Stephen Kelly 30a99f5c06 CompilerId: Add option to generate compiler-id-specific defines. 2014-05-07 14:00:00 +02:00
Stephen Kelly 36ed589484 CompilerId: Allow specifying the compiler-specific components to generate. 2014-05-07 14:00:00 +02:00
Stephen Kelly 9a083bce83 Project: Split the compiler id detection into a separate function.
This can be extended with parameters to control the output and re-used
in other contexts.
2014-05-07 14:00:00 +02:00
Stephen Kelly 9d285600d4 Project: Generate the CXX compiler Id test from multiple files.
This will allow sharing of the logic of the order to test compilers in
and the preprocessor macros used to do that and to determine the
version components.
2014-05-07 14:00:00 +02:00
Stephen Kelly c7ddd409fd Project: Clarify comment about platform-native compilers. 2014-05-07 12:48:11 +02:00