summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'WriteCompilerDetectionHeader-compiler-versions'Brad King2014-06-101-1/+5
|\ | | | | | | | | | | | | | | ddec418a Features: Add compiler version support to WriteCompilerDetectionHeader. b7029576 Project: Add configurable name for version computation macros. 78acaafe Project: Separate simulated compiler id from version detection. 567af1a5 WCDH: Issue a better message for version compatibility.
| * WCDH: Issue a better message for version compatibility.Stephen Kelly2014-06-051-1/+5
| |
* | cmake: Do not open directories as scripts (#14966)Brad King2014-06-093-0/+4
| | | | | | | | | | Check if a file path is a directory before opening it. Extend the RunCMake.CommandLine test with a case running "cmake -P" on a directory.
* | Tests: Fix RunCMake.TargetSources on Xcode 1.5Brad King2014-06-063-5/+8
| | | | | | | | | | | | Xcode 1.5 does not support multiple configurations. The generator also adds some sources internally that cause extra OriginDebug output. Update the expected output to tolerate it.
* | Allow a toolchain file to specify a generator toolsetBrad King2014-06-0410-1/+61
|/ | | | | | | | | | | | | | | | | | | | Delay use of CMAKE_GENERATOR_TOOLSET until the CMakeSystem.cmake file has been configured and loaded during the first project() or enable_language() command. This gives the toolchain file named by CMAKE_TOOLCHAIN_FILE a chance to set CMAKE_GENERATOR_TOOLSET. This point is still early enough to set the generator toolset prior to the initialization of any languages that might use the toolset. The cmake::GeneratorToolset member variable remains an indication of what was specified by the -T option or loaded from the cache. It does not need to be updated based on the toolchain file setting. The cmMakefile::TryCompile can still pass cmake::GeneratorToolset into the inner instance because the try-compiled project will do platform and language initialization using the CMakeSystem module configured for the outer project. Extend the RunCMake.GeneratorToolset test with cases that use a toolchain file to set CMAKE_GENERATOR_TOOLSET.
* Merge topic 'fix-build-crash-on-bad-generator'Brad King2014-06-049-0/+14
|\ | | | | | | | | 44e2923f cmake: Fix --build crash on bad CMAKE_GENERATOR in cache
| * cmake: Fix --build crash on bad CMAKE_GENERATOR in cacheBrad King2014-06-039-0/+14
| | | | | | | | | | | | | | | | | | | | If we fail to create the generator named by CMAKE_GENERATOR, exit with an error message instead of crashing. While at it, fix the wording of the error message when CMAKE_GENERATOR is not set. Extend the RunCMake.CommandLine test with cases covering the "cmake --build" option when the named directory does not provide a CMakeCache.txt with a valid CMAKE_GENERATOR.
| * cmTarget: Evaluate CMP0026 in calling contextBrad King2014-05-093-0/+17
| | | | | | | | | | | | | | | | | | | | This policy should be checked at the call site that tries to access the LOCATION property, not the directory scope containing the target. Thread the caller context through cmTarget::GetProperty to use for checking the policy setting and emitting a diagnostic with proper backtrace. Extend the RunCMake.CMP0026 test with a cross-directory case.
* | Merge topic 'feature-extensions-by-default'Brad King2014-06-028-4/+4
|\ \ | | | | | | | | | | | | 60a981ea Features: Enable compiler extensions by default.
| * | Features: Enable compiler extensions by default.Stephen Kelly2014-05-318-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compilers enable their extensions by default, and disabling them implicitly can lead to results which are surprising or non-obvious to debug. http://public.kitware.com/pipermail/cmake-developers/2014-May/010575.html http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10214 https://www.mail-archive.com/cmake-developers@cmake.org/msg10116.html (Compiler feature extensions by default, 29 May 2014)
* | | Genex: Clarify error message on use with non-binary targets (#14899).Stephen Kelly2014-05-2919-0/+116
|/ /
* | Merge topic 'cpack-properties'Brad King2014-05-2819-0/+94
|\ \ | | | | | | | | | | | | | | | d0b1d2a6 CPackWiX: Implement CPACK_NEVER_OVERWRITE and CPACK_PERMANENT properties 15a8af21 Add an "installed file" property scope
| * | Add an "installed file" property scopeNils Gladitz2014-05-2819-0/+94
| | | | | | | | | | | | | | | | | | | | | Teach set_property and get_property an "INSTALL" property type to be associated with install-tree file paths. Make the properties available to CPack for use during packaging. Add a "prop_inst" Sphinx domain object type for documentation of such properties.
* | | tests: test CMP0053 in WARN mode when watching variablesBen Boeckel2014-05-229-0/+37
| | | | | | | | | | | | | | | | | | | | | When CMP0053 is in WARN mode, variables get expanded twice, leaking the fact that the string was expanded twice and changing behavior. Instead, suppress variable watches when running the expansion to trigger the CMP0053 warning.
* | | Merge topic 'COMPILE_FEATURES-genex'Brad King2014-05-2213-0/+94
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0dfe395e Features: Add COMPILE_FEATURES generator expression. aa8a6fce cmMakefile: Add methods for checking availability of a feature. b6dedf03 cmMakefile: Extract CheckNeeded{C,Cxx}Language methods. 8dd129df cmMakefile: Extract CompileFeaturesAvailable method. 6b9b2fff cmMakefile: Extract CompileFeatureKnown method.
| * | | Features: Add COMPILE_FEATURES generator expression.Stephen Kelly2014-05-2113-0/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow setting build properties based on the features available for a target. The availability of features is determined at generate-time by evaluating the link implementation. Ensure that the <LANG>_STANDARD determined while evaluating COMPILE_FEATURES in the link implementation is not lower than that provided by the INTERFACE of the link implementation. This is similar to handling of transitive properties such as POSITION_INDEPENDENT_CODE.
* | | | file: Report system error on failure to open fileBrad King2014-05-206-0/+15
|/ / /
* | | Merge topic 'compile-features-C-language'Brad King2014-05-2018-1/+94
|\ \ \ | | | | | | | | | | | | | | | | e0890d03 Features: Extend concept to C language.
| * | | Features: Extend concept to C language.Stephen Kelly2014-05-1418-1/+94
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Xcode: Add source file property to control file type (#14854)Brad King2014-05-159-0/+24
|/ / | | | | | | | | | | | | | | | | Add source file properties to control Xcode file type attributes: XCODE_EXPLICIT_FILE_TYPE => explicitFileType XCODE_LAST_KNOWN_FILE_TYPE => lastKnownFileType Add a RunCMake.XcodeProject test to verify generated project content.
* | Merge topic 'WriteCompilerDetectionHeader-module'Brad King2014-05-1433-0/+174
|\ \ | | | | | | | | | | | | 62a4a67d Add the WriteCompilerDetectionHeader module.
| * | Add the WriteCompilerDetectionHeader module.Stephen Kelly2014-05-1433-0/+174
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge topic 'minor-cleanups'Brad King2014-05-122-4/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bc9a8bba Makefile: Undef FEATURE_STRING iteration define after use. eb638c75 Tests: Make CompileFeatures feature list lang-specific. e2f09aff CMakeConfigurableFile: Remove excess newline. 5109b042 Features: Fix GNU 4.8.1 version test. 6a9fdbeb Test: Parameterize the language in the CompileFeature test. f5bf9d43 Tests: Make CompileFeature tests use highest standard known.
| * | | Tests: Make CompileFeatures feature list lang-specific.Stephen Kelly2014-05-102-4/+4
| | | |
* | | | cmTarget: Evaluate CMP0026 and CMP0051 in calling contextBrad King2014-05-096-1/+41
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These policies should be checked at the call site that tries to access the LOCATION or SOURCES property, not the directory scope containing the target. Thread the caller context through cmTarget::GetProperty to use for checking the policy setting and emitting a diagnostic with proper backtrace. Extend the RunCMake.CMP0026 and RunCMake.CMP0051 tests with cross-directory cases.
* | | EVIS: Add tests for syntax corner cases and CMP0053Ben Boeckel2014-05-08107-1/+692
|/ / | | | | | | | | | | | | | | | | | | Include tests for: - @ expansion during normal execution - various characters in variable names for comparison between the new and the old parser - corner cases in the parsers - correct messages when behavior is different
* | Merge topic 'minor-cleanups'Brad King2014-05-084-4/+4
|\ \ | | | | | | | | | | | | | | | | | | 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.
| * | Features: Include the language of the compiler in error messages.Stephen Kelly2014-05-074-4/+4
| | |
* | | Merge topic 'decay-language-version'Brad King2014-05-0826-0/+102
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | cmTarget: Add CXX_STANDARD_REQUIRED to control decay.Stephen Kelly2014-05-0726-0/+102
| |/ /
* | | Merge topic 'no-assert-missing-objlib'Brad King2014-05-074-0/+27
|\ \ \ | |/ / |/| | | | | | | | d648c476 cmTarget: Don't assert on object libraries for configure-time location.
| * | cmTarget: Don't assert on object libraries for configure-time location.Stephen Kelly2014-05-064-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit b8af2011 (cmTarget: Fix listing of source files at configure-time., 2014-04-13) refactored a GetObjectLibrariesCMP0026 method out of GetLanguages. In flight, a conditional use of a target if available was changed to an assert-available. This code is only used to read the LOCATION property at configure time, when the link information is incomplete, and not all targets are defined, so the assert is inappropriate, even though it can lead to incorrect information being generated. CMP0026 warns about the potentially incorrect information anyway.
* | | file(GENERATE): Only write the file if content is different.Stephen Kelly2014-04-304-0/+34
| | | | | | | | | | | | No policy is used to control this behavior for now.
* | | Merge topic 'feature-absence-hard-error'Brad King2014-04-219-3/+38
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 8d0b1cca Features: FATAL_ERROR on compilers with no recorded features. 447fbb3f Tests: Execute compile features tests unconditionally. 597bb72e Tests: Run RunCMake.target_compile_features unconditionally.
| * | | Features: FATAL_ERROR on compilers with no recorded features.Stephen Kelly2014-04-178-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | Users of the new target_compile_features command are expected to check the existence of the CMAKE_CXX_COMPILE_FEATURES variable before attempting to use it to require features.
| * | | Tests: Run RunCMake.target_compile_features unconditionally.Stephen Kelly2014-04-161-3/+1
| | | | | | | | | | | | | | | | | | | | It is so far testing only cases which are fatal regardless of recorded features.
* | | | Merge topic 'ExternalData-missing-not-fatal'Brad King2014-04-2111-10/+43
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | ccd29b9a ExternalData: Warn on missing file instead of failing
| * | | | ExternalData: Warn on missing file instead of failingBrad King2014-04-1711-10/+43
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the primary source tree path named by a DATA{} reference does not exist, produce an AUTHOR_WARNING instead of a FATAL_ERROR. This is useful when writing a new DATA{} reference to a test reference output that has not been created yet. This way the developer can run the test, manually verify the output, and then copy it into place to provide the reference and eliminate the warning. If the named source tree path is expected to be a file but exists as a directory, we still need to produce a FATAL_ERROR.
* | | | CMP0052: Make the warning message more informative.Stephen Kelly2014-04-172-0/+10
| | | | | | | | | | | | | | | | | | | | Print the reason for the offending entry in the INTERFACE_INCLUDE_DIRECTORIES.
* | | | CMP0052: Test that include dirs in install locations cause no warnings.Stephen Kelly2014-04-174-0/+14
|/ / /
* | | Merge topic 'target_compile_features'Brad King2014-04-1555-0/+232
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9eaf3755 Export: Populate INTERFACE_COMPILE_FEATURES property. 8ed59fc2 Add target_compile_features command. 4e6ca504 cmTargetPropCommandBase: Change the interface to return bool. 5412dede cmTarget: Transitively evaluate compiler features. baff4434 cmTarget: Allow populating COMPILE_FEATURES using generator expressions. f97bf437 Features: Add cxx_auto_type. 03355d6b cmTarget: Add COMPILE_FEATURES target property. faeddf64 project: Add infrastructure for recording CXX compiler features 913394af cmTarget: Add CXX_STANDARD and CXX_EXTENSION target properties. 8238a6cd Add some COMPILE_OPTIONS for specifying C++ dialect. 892243fc Tests: Require CMake 3.0 for the SystemInformation test. 59b5fdd3 Don't load Clang-CXX from AppleClang-CXX.
| * | Add target_compile_features command.Stephen Kelly2014-04-0735-0/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can be used to set the compiler features required by particular targets. An error is issued at CMake time if the compiler does not support the required feature. If a language dialect flag is required by the features used, that will be added automatically. Base the target_compile_features command on cmTargetPropCommandBase. This gives us 'free' handling of IMPORTED, ALIAS, INTERFACE, non-compilable and missing targets.
| * | cmTarget: Transitively evaluate compiler features.Stephen Kelly2014-04-0713-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the interface of the target_compile_features command with PUBLIC and INTERFACE keywords. Populate the INTERFACE_COMPILER_FEATURES target property if they are set. Consume the INTERFACE_COMPILER_FEATURES target property from linked dependent targets to determine the final required compiler features and the compile flag, if needed. Use the same pattern of origin-debugging which is used for other build properties.
| * | cmTarget: Allow populating COMPILE_FEATURES using generator expressions.Stephen Kelly2014-04-074-0/+7
| | | | | | | | | | | | | | | | | | Delay validation of the content as a feature if it contains a generator expression. It will be checked again at generate-time after evaluation.
| * | Features: Add cxx_auto_type.Stephen Kelly2014-04-077-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Record the availability of this feature for GNU 4.8 on (UNIX AND NOT APPLE) only. In the future, availability can be recorded for earlier GNU, for other platforms and for other compilers. Initially the affected configurations are as restricted as possible to allow for easy testing while extending the features vector in only one dimension. The error message when using the set_property API directly is not very good, but follow up commits will provide origin debugging of the property and a target_compile_features command which will provide a configure-time backtrace when possible.
* | | cmTarget: Fix listing of source files at configure-time.Stephen Kelly2014-04-135-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit e5da9e51 (cmTarget: Allow any generator expression in SOURCES property., 2014-03-18), source files are computed by true evaluation of generator expressions, including TARGET_OBJECTS. This evaluation requires the presence of cmGeneratorTarget objects since commit bf98cc25 (Genex: Evaluate TARGET_OBJECTS as a normal expression., 2014-02-26). Ensure that we don't attempt to evaluate the TARGET_OBJECTS generator expression at configure-time, as can happen if CMP0024 or CMP0026 are OLD. Use old-style parsing of the source item to extract object target names in that case. Avoid calling GetProperty("SOURCES") to bypass warnings from CMP0051. Refactor existing logic in GetLanguages which is similar in intent to the new GetSourceFiles code.
* | | Export: Disallow exported interface includes in src/build tree (#14592).Stephen Kelly2014-04-0926-1/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow directories in the source tree or build tree only if the install tree is a subdirectory of the source tree or build tree, as appropriate. Re-use the test files in the RunCMake.include_directories test to run in multiple scenarios. Bump the required CMake version in the test to 3.0 to ensure that the new policy warnings are emitted correctly.
* | | RunCMake: Allow specifying the source dir and file to test.Stephen Kelly2014-04-064-3/+8
|/ / | | | | | | | | | | | | | | | | | | This will allow decoupling the name of the test from the name and location of the source file under test, which means one source file can be used for multiple tests. Rename the PARENT_SCOPE test in RunCMake.set to not use a keyword of the if() command as a file name. As the filename is now used with an if condition, this causes a conflict.
* | Merge topic 'target-transitive-sources'Brad King2014-04-0316-0/+155
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9407174b target_sources: New command to add sources to target. 81ad69e0 Make the SOURCES target property writable. 6e636f2e cmTarget: Make the SOURCES origin tracable. 3676fb49 cmTarget: Allow transitive evaluation of SOURCES property. e6971df6 cmTarget: Make the source files depend on the config. df753df9 cmGeneratorTarget: Don't add computed sources to the target. 869328aa cmComputeTargetDepends: Use valid config to compute target depends.
| * | target_sources: New command to add sources to target.Stephen Kelly2014-04-024-0/+26
| | |