summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* CustomCommandGenerator: Add support for CROSSCOMPILING_EMULATORJean-Christophe Fillion-Robin2016-05-091-1/+7
| | | | | | Teach the `add_custom_command` and `add_custom_target' commands to substitute argv0 with the crosscompiling emulator if it is a target with the `CROSSCOMPILING_EMULATOR` property set.
* Add options to run clang-tidy with the compilerDaniel Pfeifer2016-04-131-0/+2
| | | | | | Create a <LANG>_CLANG_TIDY target property (initialized by a CMAKE_<LANG>_CLANG_TIDY variable) to specify a clang-tidy command line to be run along with the compiler.
* Merge topic 'vs-startup-project'Brad King2016-03-241-1/+4
|\ | | | | | | | | | | | | | | ad140c6e VS: Put ALL_BUILD in the PREDEFINED_TARGETS_FOLDER f069be05 VS: Fix default target support for targets nested inside a folder c05ea485 VS: Improve unit test macros 78ec0461 VS: Add option to choose the `.sln` startup project (#15578)
| * VS: Fix default target support for targets nested inside a folderTaylor Braun-Jones2016-03-231-1/+4
| | | | | | | | | | It's not actually the first target in a `.sln` file that is treated as the default startup project, but rather the first fully defined target.
* | Merge topic 'timeout_after_match'Brad King2016-03-221-0/+1
|\ \ | |/ |/| | | | | | | de7afd29 Help: Add notes for topic 'timeout_after_match' 993e48d0 CTest: Optionally use a secondary test timeout after matching output
| * CTest: Optionally use a secondary test timeout after matching outputZack Galbreath2016-03-221-0/+1
| | | | | | | | | | | | Allow a test N seconds to complete after we detect a matching line in its output. Activate this behavior with a new TIMEOUT_AFTER_MATCH test property.
* | Tests: Rename RunCMake.{SolutionGlobalSections => VSSolution}Brad King2016-03-181-1/+1
|/ | | | The test will be suitable for covering other `.sln` content too.
* Drop Visual Studio 6 generatorBrad King2016-03-091-2/+2
| | | | | | This generator has been deprecated since CMake 3.3. Remove it. Update documentation, modules, and tests to drop content specific to this generator.
* Diagnose recursive project/enable_language without crashing (#15999)Brad King2016-03-071-0/+1
| | | | | | | Calling `project()` or `enable_language()` from a toolchain file will infinitely recurse since those commands load the toolchain file. Diagnose and reject this case with an error message instead of crashing when the stack eventually overflows.
* VS: Add option to set `ConfigurationType` of a .vcxproj fileFabian Otto2016-02-261-0/+4
| | | | | | Add a VS_CONFIGURATION_TYPE target property to set this value explicitly. This is useful to build a Windows Kernel Mode Driver, for example.
* CMakeParseArguments: add a RunCMake test suiteMatthias Maennich2015-12-171-0/+1
|
* Add test for OSX/iOS Framework directory structure (#15833)Gregor Jasny2015-11-131-0/+6
|
* CPack: allow packaging of empty directoriesDomen Vrankar2015-09-281-1/+1
|
* CMP0065: Restrict the use of CMAKE_SHARED_LIBRARY_LINK_<LANG>_FLAGSChuck Atkins2015-09-211-0/+7
| | | | | This new policy restricts the addition of the shared library link flags to executables only when the ENABLE_EXPORTS property is set to True.
* Tests: Add RunCMake.BuildDepends testBrad King2015-09-171-0/+1
| | | | | This will allow more granular checks than the main BuildDepends test. Start with a simple single-source C program.
* Merge topic 'find_program-NAMES_PER_DIR'Brad King2015-09-081-0/+1
|\ | | | | | | | | | | | | | | | | | | 8ea7611b find_program: Optionally consider all names in each directory fc1990c9 cmFindProgramCommand: Re-implement search using more flexible approach fdbfc9f6 Tests: Add explicit testing for find_program 907a919b cmSystemTools: Drop unused StringEndsWith method ed4de3c9 cmFindProgramCommand: Use Names member instead of passing it bf32b95e cmFindLibraryCommand: Avoid repeating search for the same name
| * Tests: Add explicit testing for find_programBrad King2015-09-021-0/+1
| | | | | | | | | | | | Previously this command was tested only implicitly as part of larger tests. Add a RunCMake.find_program test to cover find_program cases specifically and independently.
* | Merge topic 'add-link-search-static-properties-defaults'Brad King2015-09-031-0/+1
|\ \ | |/ |/| | | | | 18d7f8fb Tests: Move LINK_SEARCH_{START,END}_STATIC case to dedicated test
| * Tests: Move LINK_SEARCH_{START,END}_STATIC case to dedicated testBrad King2015-09-021-0/+1
| | | | | | | | | | | | | | | | | | | | The test case added to RunCMake.set_property by commit 675ef165 (Allow LINK_SEARCH_{START,END}_STATIC props to have default values, 2015-08-07) is not a test of the set_property command and so belongs in its own test case. Create a new RunCMake.LinkStatic test to cover cases related to static linking. While at it, simplify the LINK_SEARCH_STATIC test case to enable only C.
* | CPack generator independent testsRoman Donchenko2015-08-281-0/+1
|/ | | | | | | | CPackConfig.cmake file generation from CMake test suite. Currently it contains only a simple test without special characters in variable value. Test is not part of RunCMake/CPack as those tests are expected to be run for a specified generator.
* Merge topic 'cmState-policies'Brad King2015-08-061-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | 757a1f54 cmState: Move PolicyState from cmMakefile. 52dbe654 cmState: Record the end position of each directory. 65a5e0c6 cmLinkedTree: Add Clear API. 34835433 cmState: Add Type for policy scope. af0de01c cmState: Remove call stack parent tracking. 6ae8b30b cmMakefile: Move policy barriers inside cmState scopes. a5fc17b5 cmMakefile: Re-order policy entries and barriers. 0a01e6c6 cmState: Add Snapshot Type accessor. f0005bb4 Tests: Verify generate-time policy scope behavior.
| * Tests: Verify generate-time policy scope behavior.Stephen Kelly2015-08-011-0/+1
| | | | | | | | | | If some day there are no policies checked through the makefile at generate time, this can be fixed.
* | Merge topic 'fix-missing-subdir-error'Brad King2015-08-061-0/+1
|\ \ | | | | | | | | | | | | c4d2f64f add_subdirectory: Fix error message on missing CMakeLists.txt (#15680)
| * | add_subdirectory: Fix error message on missing CMakeLists.txt (#15680)Brad King2015-08-041-0/+1
| | | | | | | | | | | | | | | | | | Refactoring in commit v3.3.0-rc1~76^2 (cmMakefile: Handle CMP0014 before configuring the generator, 2015-05-14) accidentally left the file name "/CMakeLists.txt" in the error message. Remove it and add a test case.
* | | if: Add "TEST <test>" conditionMatt McCormick2015-08-031-0/+1
| |/ |/| | | | | | | | | | | | | if(TEST TestNameThatExists) will return true if a test with the name TestNameThatExists has been added with add_test. The syntax is similar to if(TARGET TargetName). Since use of "TEST" as an argument to if() could previously be interpreted as a non-keyword argument, add policy CMP0064 to treat it as a keyword as NEW behavior.
* | CompileDefinitions: Add unit test for setting empty content.Stephen Kelly2015-07-221-0/+1
| |
* | Merge topic 'makefile-target-messages'Brad King2015-07-151-0/+3
|\ \ | | | | | | | | | | | | | | | | | | f0cad193 Tests: Add test for TARGET_MESSAGES global property 1d398478 Makefile: Optionally disable target completion messages in build output d560b46f CMakeGenericSystem: Recognize Watcom WMake generator as Makefile generator
| * | Tests: Add test for TARGET_MESSAGES global propertyBrad King2015-07-141-0/+3
| | |
* | | Tests: Move command failure cases into RunCMake infrastructureBrad King2015-07-141-0/+1
|/ / | | | | | | | | | | | | Move failure cases from the CMake.{If,List,While,GetProperty} tests over to the RunCMake.{if,list,while,get_property} tests to use the more modern infrastructure. This also avoids using REGEX_ESCAPE_STRING to try to regex-match full paths.
* | Merge topic 'empty-LINK_LIBRARIES'Brad King2015-07-091-0/+1
|\ \ | |/ | | | | | | 7aa9e80e set_property: Fix crash when setting LINK_LIBRARIES to nothing
| * set_property: Fix crash when setting LINK_LIBRARIES to nothingBrad King2015-07-081-0/+1
| | | | | | | | | | | | | | | | We use a special dedicated structure to store the LINK_LIBRARIES target property. Do not try to construct a string from a NULL value. Instead leave the property structure empty when no value is given. Reported-by: Ghyslain Leclerc <ghleclerc@gmail.com>
* | Merge topic 'add-apple-swift-language'Brad King2015-07-081-0/+5
|\ \ | | | | | | | | | | | | bf112531 Add rudimentary support for the Apple Swift language with Xcode
| * | Add rudimentary support for the Apple Swift language with XcodeBrad King2015-07-061-0/+5
| | | | | | | | | | | | | | | | | | | | | Allow the `Swift` language to be enabled with the Xcode generator for Xcode >= 6.1. Reject it on other generators and with older Xcode versions. Since Apple is the only vendor implementing the language right now, the compiler id can be just `Apple`.
* | | Windows: Optionally generate DLL module definition files automaticallyBill Hoffman2015-07-061-0/+3
|/ / | | | | | | | | | | | | Create target property WINDOWS_EXPORT_ALL_SYMBOLS to automatically generate a module definition file from MS-compatible .obj files and give it to the linker in order to export all symbols from the .dll part of a SHARED library.
* | Merge topic 'GNUInstallDirs-special-prefixes'Brad King2015-06-191-0/+1
|\ \ | | | | | | | | | | | | | | | | | | 8bcec4d2 Help: Add notes for topic 'GNUInstallDirs-special-prefixes' c8bd37ec GNUInstallDirs: Add special cases for certain prefixes 5f30f175 GNUInstallDirs: Add test cases
| * | GNUInstallDirs: Add test casesBrad King2015-06-181-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | Add a RunCMake.GNUInstallDirs test with cases covering various install prefixes. Hard-code the architecture information. Tolerate all platform-specific LIBDIR values. Currently the root prefix is not handled well, but verify the current behavior in the test anyway. This can be addressed with a future change. Inspired-by: Alex Turbov <i.zaufi@gmail.com>
* | Merge topic 'cpack-rpm-and-deb-runcmake-tests'Brad King2015-06-161-4/+35
|\ \ | | | | | | | | | | | | | | | 5f61ed99 Tests: Move RunCMake.CPackRPM case into RunCMake.CPack_RPM test e726fc02 Tests: Add RunCMake tests for CPack{Deb,RPM}
| * | Tests: Move RunCMake.CPackRPM case into RunCMake.CPack_RPM testDomen Vrankar2015-06-151-4/+0
| | | | | | | | | | | | | | | | | | Move PARTIALLY_RELOCATABLE_WARNING test to the new common CPack test script structure to have all tests in one place as well as additional benefit of having some more checks done during test execution.
| * | Tests: Add RunCMake tests for CPack{Deb,RPM}Domen Vrankar2015-06-151-0/+35
| |/ | | | | | | Add script structure for easier addition of new CPack related tests.
* | Add options to launch the compiler through tools like ccache or distccBill Hoffman2015-06-151-0/+1
|/ | | | | | | | | | | | | Create a <LANG>_COMPILER_LAUNCHER target property (initialized by a CMAKE_<LANG>_COMPILER_LAUNCHER variable) to specify a compiler launcher tool. This will supersede the CMAKE_<LANG>_COMPILER_ARG1 approach to using such tools. The old approach set CMAKE_<LANG>_COMPILER to the launcher tool while the new approach leaves this variable set to the actual compiler. Implement this property for Makefile and Ninja generators. It cannot be implemented for VS or Xcode generators as the IDE build tools offer no such hooks.
* Tests: Refactor RunCMake.VisibilityPreset test setupBrad King2015-05-221-16/+3
| | | | | | | | Enable languages only in the individual test case. Enable the test everywhere except Visual Studio generators (which do not implement the properties) and just set fake flags as needed to activate relevant code paths. Drop unneeded CMAKE_SUPPRESS_REGENERATION which seems to have been copied from an unrelated test when this test was created.
* Add options to run include-what-you-use with the compilerBrad King2015-05-191-0/+5
| | | | | | Create a <LANG>_INCLUDE_WHAT_YOU_USE target property (initialized by a CMAKE_<LANG>_INCLUDE_WHAT_YOU_USE variable) to specify an IWYU command line to be run along with the compiler.
* execute_process: Improve stdout/stderr mergingBrad King2015-05-071-0/+1
| | | | | | | Use the KWSys Process "MergeOutput" option to give the child process the same pipe (or file) for both stdout and stderr. This allows natural merging of stdout and stderr together instead of merging on arbitrary buffered read boundaries as before.
* if: Implement new IN_LIST operatorNils Gladitz2015-04-301-0/+1
|
* Revert "add_custom_command: Diagnose MAIN_DEPENDENCY limitation."Nils Gladitz2015-04-301-1/+0
| | | | | | | | | | | | This reverts commit 242c3966 (add_custom_command: Diagnose MAIN_DEPENDENCY limitation, 2015-03-09) and the follow up commit b372a99a (UseSWIG: Do not use MAIN_DEPENDENCY on custom commands, 2015-03-26). I misdiagnosed the underlying issue that prompted creation of policy CMP0057. The actual issue surfaces when a single custom command's MAIN_DEPENDENCY is listed in more than one target; this issue will have to be addressed independently.
* Merge topic 'emulator-property'Brad King2015-04-131-0/+8
|\ | | | | | | | | c9e9c31c Tests: Create pseudo_emulator output dir for Xcode 2.x
| * Tests: Create pseudo_emulator output dir for Xcode 2.xBrad King2015-04-101-0/+8
| | | | | | | | | | Apply the workardound from commit v2.8.2~598 (Create CMakeLibTests output dir for Xcode, 2009-12-09) to the pseudo_emulator tool.
* | Tests: Consolidate, refactor and extend -E tar testsNils Gladitz2015-04-101-0/+1
| |
* | Merge topic 'link-implicit-libs-full-path'Brad King2015-04-091-0/+1
|\ \ | |/ |/| | | | | | | | | 882f48e5 Link libraries by full path even in implicit directories 318cd370 Help: Add link target for Find Modules section of cmake-developer.7 1535dcd8 Tests: Teach RunCMake to optionally merge command output to stdout
| * Link libraries by full path even in implicit directoriesBrad King2015-04-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CMP0003 was first introduced we wanted to link all libraries by full path. However, some projects had problems on platforms where find_library would find /usr/lib/libfoo.so when the project really wanted to link to /usr/lib/<arch>/libfoo.so and had been working by accident because pre-CMP0003 behavior used -lfoo to link. We first tried to address that in commit v2.6.0~440 (Teach find_library to avoid returning library paths in system directories, 2008-01-23) by returning just "foo" for libraries in implicit link directories. This caused problems for projects expecting find_library to always return a full path. We ended up using the solution in commit v2.6.0~366 (... switch library paths found in implicit link directories to use -l, 2008-01-31). However, the special case for libraries in implicit link directories has also proven problematic and confusing. Introduce policy CMP0060 to switch to linking all libraries by full path even if they are in implicit link directories. Explain in the policy documentation the factors that led to the original approach and now to this approach.