summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'revert-definition-map-lookup' into releasev3.1.0-rc1Brad King2014-10-245-0/+266
|\
| * Merge branch 'parent-scope-tests' into variable-pull-failureBen Boeckel2014-10-245-0/+266
| |\ | | | | | | | | | | | | | | | | | | | | | | | | * parent-scope-tests: test: add a test for PARENT_SCOPE with multiple scopes test: add test for PARENT_SCOPE behavior Conflicts: Tests/RunCMake/set/RunCMakeTest.cmake
| | * test: add a test for PARENT_SCOPE with multiple scopesBen Boeckel2014-10-243-0/+249
| | | | | | | | | | | | See the comment in the test for what is being tested here.
| | * test: add test for PARENT_SCOPE behaviorBen Boeckel2014-10-243-0/+17
| | | | | | | | | | | | Test code courtesy of Alex Merry <alex.merry@kde.org>.
* | | FPHSA: fix when requested or found version is exactly 0Rolf Eike Beer2014-10-074-0/+8
| | | | | | | | | | | | | | | Until now it was checked with "if(VAR)", which will be false in case "0" is the content of the variable.
* | | FPHSA: when EXACT version match is requested only compare the components givenRolf Eike Beer2014-10-0721-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | Given that you have a foobar that identifies itself as 1.2.3 from now on a find_package(foobar 1.2 EXACT) will succeed, as 1.2.3 will now be considered as being 1.2. Until now this was only the case for version 1.2.0.
* | | Merge topic 'ninja-compiler-change'Brad King2014-09-241-1/+1
|\ \ \ | | | | | | | | | | | | | | | | 6120fca8 Ninja: Prevent compilers to be silently modified
| * | | Ninja: Prevent compilers to be silently modifiedSylvain Joubert2014-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike with Unix Makefiles generator modifying compiler paths was not protected with Ninja generator. It was possible to modify them in the cache without the expected effect on the generated solution. Also activate corresponding tests with Ninja.
* | | | Tests: Fix CMP0054 warningsBrad King2014-09-164-5/+5
|/ / / | | | | | | | | | | | | Hack the CMP0054 warning locally to be an error and run the test suite. Resolve CMP0054 in Tests/* code as appropriate for each case.
* | | Merge topic 'vs-generator-platform'Brad King2014-09-1513-1/+60
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | be6a555d Tests: Test setting a generator platform in a toolchain file d506fee8 Tests: Use -A option to pass generator platform selection 11c9ddd6 ExternalProject: Use -A option to pass generator platform 29bd843e CTest: Use -A option to pass generator platform selection eb7d8156 cmake: Add -A option to specify a generator platform
| * | | Tests: Test setting a generator platform in a toolchain fileBrad King2014-09-159-0/+50
| | | | | | | | | | | | | | | | | | | | Teach the RunCMake.GeneratorPlatform test to cover setting CMAKE_GENERATOR_PLATFORM in a file loaded by CMAKE_TOOLCHAIN_FILE.
| * | | cmake: Add -A option to specify a generator platformBrad King2014-09-155-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define the 'cmake -A' option to set CMAKE_GENERATOR_PLATFORM without having to spell out the whole variable name. We choose the name '-A' for "platform" because '-P' is already taken, and in the common use case the "platform" is actually an architecture (e.g. x64). Teach the RunCMake test infrastructure to use -A to pass the generator platform. Extend the RunCMake.GeneratorPlatform test with a case to verify that the -A option cannot be repeated.
* | | | Merge topic 'if-sanity'Brad King2014-09-1526-0/+436
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 858d5a0b Fix if() checks of CMAKE_SYSTEM_NAME on Cygwin e177e7af FPHSA: Avoid if() dereferencing of quoted variable 425acc52 cmcurl: Use if(DEFINED) to simplify conditions cede5cbd libarchive: Avoid depending on if() to dereference a quoted variable 2d97178b FindGTK2: Avoid depending on if() to dereference a quoted variable 0b12815d Modules/Test*.cmake: Use if(DEFINED) to simplify conditions 188a1f23 If: Introduce policy CMP0054 - don't dereference quoted variables in if() b900c1cc If: Extract cmConditionEvaluator from if() implementation
| * | | If: Introduce policy CMP0054 - don't dereference quoted variables in if()Nils Gladitz2014-09-1126-0/+436
| | | |
* | | | Tests: Add generator platform supportBrad King2014-09-104-5/+8
| | | | | | | | | | | | | | | | | | | | Propagate CMAKE_GENERATOR_PLATFORM through the test hierarchy so that all tests can build with the selected generator platform, if any.
* | | | VS: Implement CMAKE_GENERATOR_PLATFORM for VS >= 8Brad King2014-09-053-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For VS generator names that do not specify the platform name, read CMAKE_GENERATOR_PLATFORM to get it. Extend the RunCMake.GeneratorPlatform test with a case covering use of the x64 platform when the test generator is a Visual Studio generator whose name does not specify a platform.
* | | | CMake: Add CMAKE_GENERATOR_PLATFORM optionBrad King2014-09-059-0/+35
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reject the option by default. It will be implemented on a per-generator basis. Pass the setting into try_compile project generation. Add cache entry CMAKE_GENERATOR_PLATFORM and associated variable documentation to hold the value persistently. Add a RunCMake.GeneratorPlatform test to cover basic use cases for the option. Verify that CMAKE_GENERATOR_PLATFORM is empty by default, and that it is rejected when the generator does not support a user setting.
* | | StringUuid: Implement new string(UUID) sub-command.Nils Gladitz2014-08-2820-0/+79
| | |
* | | Merge topic 'fix-lexer-open-square'Brad King2014-08-192-2/+2
|\ \ \ | | | | | | | | | | | | | | | | 02b3cba9 cmListFileLexer: Fix lexing of single '[' character (#15092)
| * | | cmListFileLexer: Fix lexing of single '[' character (#15092)Brad King2014-08-182-2/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | The lexer changes in commit v3.0.0-rc1~495^2 (Add Lua-style long brackets and long comments to CMake language, 2013-08-06) accidentally left out matching '[' as a single character in an unquoted argument. Add a lexer rule to match it and extend the RunCMake.Syntax test to cover this case.
* | | Merge topic 'fix-CMP0049-extra-error'Brad King2014-07-314-0/+14
|\ \ \ | | | | | | | | | | | | | | | | b2282631 cmTarget: Do not mistake a preceding error for a CMP0049 failure
| * | | cmTarget: Do not mistake a preceding error for a CMP0049 failureBrad King2014-07-304-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After calls to ProcessSourceItemCMP0049, check for an empty return string to detect a failure instead of trusting GetErrorOccuredFlag. The latter could have been left from a preceding non-fatal error. Extend the RunCMake.Configure test to cover a case that exposed this problem.
* | | | Genex: Implement generator expressions for target PDB files.Nils Gladitz2014-07-3111-0/+86
|/ / /
* | | Tests: Activate tests accidentally excluded from XcodeBrad King2014-07-172-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The generator name is "Xcode", not "XCode". Fix this typo. Explicitly exclude the SubDirSpaces test on Xcode because it does not work. Also tell the RunCMake.File_Generate test when Xcode is not multi-config so it can exlcude the OutputConflict case. Inspired-by: Daniele E. Domenichelli <daniele.domenichelli@iit.it>
* | | Allow INTERFACE_SOURCES to specify $<TARGET_OBJECTS> (#14970)Brad King2014-07-142-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix cmTarget::GetSourceFiles to set EvaluateForBuildsystem on the $<TARGET_PROPERTY:...,INTERFACE_SOURCES> generator expression so that the $<TARGET_OBJECTS> generator expression is allowed within an INTERFACE_SOURCES value. Extend the InterfaceLibrary test to cover this case. Extend the RunCMake.TargetObjects test to cover failure of $<TARGET_OBJECTS> when used through $<TARGET_PROPERTY:...,INTERFACE_SOURCES> in a non-buildsystem context.
* | | add_library: Allow arbitrary non-linked sources in OBJECT librariesBrad King2014-07-092-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Loosen this restriction on OBJECT libraries to allow source files of any name to be generated by custom commands or listed for reference in IDE projects so long as they would not affect linking of a normal library. Update the rejection message to be more specific about the looser restriction. Extend the ObjectLibrary test to cover a ".cmake" file generated by a custom command in an OBJECT library.
* | | Merge topic 'refactor-usage-requirement-evaluation'Brad King2014-07-073-10/+14
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 93790506 cmTarget: Simplify INTERFACE_INCLUDE_DIRECTORIES usage requirement lookup b5b098eb cmTarget: Simplify CMP0027 logic in processIncludeDirectories 5e07dcf7 cmTarget: Add to LinkImplementation whether each library was a genex f77b384c cmTarget: Simplify INTERFACE_COMPILE_FEATURES usage requirement lookup 61ef8daa cmTarget: Simplify INTERFACE_COMPILE_DEFINITIONS usage requirement lookup d9586f83 cmTarget: Simplify INTERFACE_COMPILE_OPTIONS usage requirement lookup 3156275b cmTarget: Simplify INTERFACE_SOURCES usage requirement lookup 363cd33e cmTarget: Add method to add usage requirements from linked interfaces 251e835b cmTarget: Add to LinkImplementation a backtrace for each library 848c8ccf cmTarget: Refactor LinkImplementation to allow more information f85ccf23 cmGeneratorExpressionEvaluator: Shorten some long lines 82e91e34 cmComputeLinkDepends: Convert AddLinkEntries to a template
| * | | cmTarget: Simplify INTERFACE_INCLUDE_DIRECTORIES usage requirement lookupBrad King2014-07-071-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the AddInterfaceEntries helper to avoid duplication. In TargetPropertyEntry, replace the TargetName string member with a reference to the full cmLinkImplItem that produced the entry. This is possible because the cmLinkImplItem is available in AddInterfaceEntries (it was not available in GetIncludeDirectories). Having the full cmLinkImplItem allows processIncludeDirectories to implement CMP0027 OLD behavior without repeating the target name lookup. Update the RunCMake.CompatibleInterface test DebugProperties case expected output for the new order of the messages.
| * | | cmTarget: Simplify INTERFACE_SOURCES usage requirement lookupBrad King2014-07-072-3/+7
| | | | | | | | | | | | | | | | Use the AddInterfaceEntries helper to avoid duplication.
* | | | WCDH: Ensure that the prefix argument to the macro is valid.Stephen Kelly2014-07-027-0/+34
|/ / / | | | | | | | | | | | | The prefix must be a C-identifier because it is written as the prefix of preprocessor macros and possibly structs.
* | | Merge topic 'fix-circular-transitive-properties-segfault'Brad King2014-07-0220-0/+128
|\ \ \ | | | | | | | | | | | | | | | | | | | | 65aa5442 Target: Return null when a transitive property is not defined. 61ce6547 Genex: Fix stack overflow in transitive property evaluation.
| * | | Genex: Fix stack overflow in transitive property evaluation.Stephen Kelly2014-07-0120-0/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit v2.8.11~156^2~2 (Expand includes and defines transitively in 'external' genexes., 2013-02-13) introduced a recursive loop and a stack overflow during evaluation of a link implementation which depends on a transitive property, such as add_library(empty1 ...) add_library(empty2 ...) target_link_libraries(empty1 PRIVATE $<$<STREQUAL:$<TARGET_PROPERTY:INCLUDE_DIRECTORIES>,/foo/bar>:empty2> ) There is no use-case for code like that currently, but it should not cause a stack overflow. Avoid the recursion by reporting an error early if a case like this is found.
* | | | Merge topic 'test-speedup-RunCMake.include_directories'Brad King2014-07-0119-44/+55
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9998d78d Tests: Speed up RunCMake.include_directories test 6eee5d74 Tests: Drop broken and now unused RunCMake_TEST_FILE option f0f15b93 Tests: Refactor RunCMake.include_directories to drop RunCMake_TEST_FILE 8707814e Tests: Refactor RunCMake.File_Generate to drop RunCMake_TEST_FILE
| * | | | Tests: Speed up RunCMake.include_directories testBrad King2014-06-3011-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary language initializations. Change the main CMakeLists.txt project() call to specify NONE. Use enable_language(CXX) instead of project() in cases that need it to avoid enabling C too.
| * | | | Tests: Drop broken and now unused RunCMake_TEST_FILE optionBrad King2014-06-301-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We cannot use -DRunCMake_TEST=${RunCMake_TEST_FILE} because test cases use project(${RunCMake_TEST}) and the project name cannot be a path to a file. The parent and grandparent commits removed the only uses of the option. Drop it now.
| * | | | Tests: Refactor RunCMake.include_directories to drop RunCMake_TEST_FILEBrad King2014-06-304-24/+35
| | | | | | | | | | | | | | | | | | | | | | | | | Drop use of RunCMake_TEST_FILE and pass the test file in through a definition in RunCMake_TEST_OPTIONS.
| * | | | Tests: Refactor RunCMake.File_Generate to drop RunCMake_TEST_FILEBrad King2014-06-304-5/+8
| |/ / / | | | | | | | | | | | | | | | | Drop use of RunCMake_TEST_FILE and pass the test file in through a definition in RunCMake_TEST_OPTIONS.
* | | | Merge topic 'vs14-generator'Brad King2014-06-301-2/+2
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f0e298ad Help: Add notes for topic 'vs14-generator' 5c105140 Tests: Simplify LoadCommand tests b1cbd577 FindBoost: Add -vc140 mangling for VS 14 bdc7d9c8 VS14: Fix Cl and Link flag tables as previous versions d96b3f68 VS14: Generate flag tables from MSBuild v140 tool files 65624c39 VS14: Add Visual Studio 14 generator (#14982) 8635ac23 Tests/Preprocess: Remove unnecessary VS version tests
| * | | VS14: Add Visual Studio 14 generator (#14982)Brad King2014-06-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call the generator "Visual Studio 14" without any year because this version of VS does not provide a year in the product name. Copy cmGlobalVisualStudio12Generator to cmGlobalVisualStudio14Generator and update version numbers accordingly. Add the VS14 enumeration value. Teach the platform module Windows-MSVC to set MSVC14 and document the variable. Teach module InstallRequiredSystemLibraries to look for the VS 14 runtime libraries. Teach tests CheckCompilerRelatedVariables, VSExternalInclude, and RunCMake.GeneratorToolset to treat VS 14 as they do VS 10, 11, and 12. Co-Author: Pawel Stopinski <diokhan@go2.pl>
* | | | Merge topic 'install-messages'Brad King2014-06-2718-0/+143
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d19b64d6 install(DIRECTORY): Add MESSAGE_NEVER option to avoid output (#13761) c9568de5 install: Add CMAKE_INSTALL_MESSAGE variable (#13761) ec7cf7ea install: Thread message level setting through internal API abebcd23 file(INSTALL): Add undocumented options to control output verbosity 464567a5 file(INSTALL): Report existing DIRECTORY as Up-to-date f701b0b7 file(INSTALL): Do not pre-create DESTINATION for DIRECTORY f0a01962 cmInstallTargetGenerator: Drop default constructor arguments 67815894 Help: Add install() command document section headers
| * | | install(DIRECTORY): Add MESSAGE_NEVER option to avoid output (#13761)Brad King2014-06-246-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Installing large directories, e.g., the output of a doxygen run, prints one line per file resulting in too much noise in the build output. Add an option to the install(DIRECTORY) command to not print anything upon make install. Extend the RunCMake.install test with cases covering MESSAGE_NEVER behavior of the install(DIRECTORY) command. Suggested-by: Stefan Eilemann <Stefan.Eilemann@epfl.ch>
| * | | install: Add CMAKE_INSTALL_MESSAGE variable (#13761)Brad King2014-06-244-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a variable to allow users to control which installation messages are printed. In particular, provide a "LAZY" setting that prints "Installing" messages but not "Up-to-date" messages. This is desirable for incremental re-installations. Suggested-by: J Decker <d3ck0r@gmail.com>
| * | | file(INSTALL): Add undocumented options to control output verbosityBrad King2014-06-246-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | Create options "MESSAGE_ALWAYS", "MESSAGE_LAZY", and "MESSAGE_NEVER" to specify whether to print the "Installing" and "Up-to-date" messages. Extend the RunCMake.file test with cases covering these options.
| * | | file(INSTALL): Report existing DIRECTORY as Up-to-dateBrad King2014-06-248-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach cmFileCopier::InstallDirectory to detect whether the destination directory exists. If so, report it as "Up-to-date" instead of "Installing". This resolves message asymmetry with file installations. Extend the RunCMake.file and RunCMake.install tests to check the installation output on both the first and second run. Suggested-by: J Decker <d3ck0r@gmail.com>
* | | | cmake: Add '-E env' command-line toolBrad King2014-06-2311-0/+24
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the cmake command-line interface to support cmake -E env [--unset=NAME]... [NAME=VALUE]... COMMAND [ARG]... This will be useful to run processes with modified environments without using a shell or a full "cmake -P" script to wrap it. Extend the RunCMake.CommandLine test to cover success and failure cases. Inspired-by: Jonathan Bohren <jbo@jhu.edu>
* | | 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.