summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* AIX: Explicitly compute executable exports for both XL and GNUBrad King2019-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | On AIX, symbols in executables must be exported in order to be visible to modules (plugins) they load via `dlopen`. Prior to policy `CMP0065`, CMake linked all executables with flags to export symbols, but the NEW behavior for that policy is to do so only for executables that have the `ENABLE_EXPORTS` target property set. In both cases, CMake has always used the AIX linker option `-bexpall` option to export symbols from executables. This has worked fairly well with the XL compiler, but with the GNU compiler it works only for C ABI symbols. The reason is that `-bexpall` does not export symbols starting in `_` but the GNU C++ ABI mangles all symbols with a leading `_`. Therefore we have only supported C ABI plugins with the GNU compiler on AIX. Some projects have tried to work around this by replacing `-bexpall` with `-bexpfull`, but the latter often exports symbols that we do not want exported. Avoid using `-bexpall` for executables by instead using by our own internal `ExportImportList` script to compute symbol export lists from the object files to be linked into an executable. Pass the explicitly computed export list to the AIX linker's `-bE:...` option. We already do this for shared object exports. Issue: #19163
* Merge topic 'escape-install-rpath'Kyle Edwards2019-06-171-1/+6
|\ | | | | | | | | | | | | | | | | 4caefbb423 cmInstallTargetGenerator: Add tests for the RPATH_CHANGE rule 749ce48eb5 cmInstallTargetGenerator: Escape generated OLD_RPATH argument 9e84c7c5e8 cmInstallTargetGenerator: Introduce CMP0095 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3383
| * cmInstallTargetGenerator: Add tests for the RPATH_CHANGE ruleDennis Klein2019-06-131-1/+6
| |
* | Merge topic 'add-test-command-expand-lists'Brad King2019-06-121-0/+2
|\ \ | |/ |/| | | | | | | | | e791ffac61 add_test: Add COMMAND_EXPAND_LISTS option Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3422
| * add_test: Add COMMAND_EXPAND_LISTS optionSergey Bobrenok2019-06-071-0/+2
| | | | | | | | | | | | | | | | | | Add a `COMMAND_EXPAND_LISTS` option to the `add_test` command to cause `;`-separated lists produced by generator expressions to be expanded into multiple arguments. The `add_custom_command` command already has such an option. Fixes: #17284
* | file: Add GET_RUNTIME_DEPENDENCIES modeKyle Edwards2019-06-101-1/+1
|/ | | | Co-Authored-by: Bryon Bean <bryon.bean@kitware.com>
* Tests: Fix RunCMake.ctest_update test to not require GIT_EXECUTABLEBrad King2019-06-041-1/+1
| | | | | | | Fix the test case added by commit 95db11fdb1 (ctest: Include ChangeId in Update.xml, 2019-04-23) to work in a release branch of CMake. The `GIT_EXECUTABLE` value is not set before we add this test in release branch builds.
* Teach CROSSCOMPILING_EMULATOR to support argumentsMarek Antoniak2019-06-031-1/+3
| | | | Fixes: #19321
* Tests: add a check for the Swift compilerSaleem Abdulrasool2019-05-171-1/+1
| | | | This ensures that the tests only run when the Swift compiler is present.
* MSVC: Add support for /JMC (Just My Code)Luca Cappa2019-05-141-1/+4
|
* ctest: Include ChangeId in Update.xmlZack Galbreath2019-04-231-0/+1
|
* MSVC: Do not add /W3 to CMAKE_<LANG>_FLAGS by defaultBrad King2019-04-191-0/+1
| | | | | | | | | | | | | | We do not add default warning flags on other compilers, and having a warning flag in the default flags makes it hard for projects to customize the warning level. They need to use string processing to remove `/W3` from `CMAKE_{C,CXX}_FLAGS`. Therefore we should drop it. However, projects may be using string processing to replace `/W3` with another flag, so we cannot simply drop it. Add a policy to drop it in a compatible way. Fixes: #18317
* MSVC: Add abstraction for runtime library selectionBrad King2019-04-171-0/+3
| | | | | | | | | | | | | | | | Replace our hard-coded defaults for `/MD` and `/MDd` with a first-class abstraction to select the runtime library from an enumeration of logical names. We've long hesitated to do this because the idea of "runtime library selection" touches on related concepts on several platforms. Avoid that scope creep by simply defining an abstraction that applies only when targeting the MSVC ABI on Windows. Removing the old default flags requires a policy because existing projects may rely on string processing to edit them and choose a runtime library under the old behavior. Add policy CMP0091 to provide compatibility. Fixes: #19108
* Add a test to verify meta-feature parity with granular featuresRobert Maynard2019-04-091-0/+3
|
* Tests: Run FindGTK2 tests only when explicitly enabledBrad King2019-03-141-2/+1
| | | | | | Do not `find_package(GTK2)` by default, as it gives the impression that CMake depends on it to build. We will set `CMake_TEST_FindGTK2` in the cache of automated builds where GTK2 is expected to work.
* Tests: Restore support for CMake 3.1 through 3.6 with MSVCBrad King2019-02-261-3/+3
| | | | | | | | | | The change in commit a5dd159990 (Tests: Fix RunCMake.try_compile CxxStandard case on MSVC, 2017-09-22, v3.10.0-rc1~63^2) introduced use of `if()` conditions not supported until CMake 3.7, so while it was intended to restore support for CMake versions prior to 3.9, it actually only did so for 3.7 and 3.8. Backport the logic to work with CMake 3.1. Fixes: #18987
* Tests: add cases for providing Qt5Core_VERSION manuallyBen Boeckel2019-01-301-1/+8
|
* Merge topic 'add_consistent_verbose_build_flag'Brad King2019-01-291-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | 66801f4d40 cmake: Add tests for verbose output to --build mode 439fe2e253 cmake: Add options for verbose output to --build mode 638667efa2 cmake: cmcmd.cxx fix "The arguments are" comments 3ca4402966 ctest: Fix --build-and-test without --build-target on Xcode cb6c233ecc cmake: Add -hideShellScriptEnvironment xcodebuild option 1a45266cb5 cmGlobalGenerator: Add a class that represent the build command Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2708
| * cmake: Add tests for verbose output to --build modeRobert Maynard2019-01-281-1/+1
| |
* | cmMakefile: Impose maximum recursion limitKyle Edwards2019-01-231-0/+1
|/ | | | | | | | | In order to keep infinitely-recursive scripts from causing a stack overflow in the CMake executable, CMake now imposes a maximum recursion limit before issuing an error message. The limit can be adjusted at runtime with CMAKE_MAXIMUM_RECURSION_DEPTH. Fixes: #18694
* Compute implicit include directories from compiler outputChuck Cranor2019-01-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - CMakeParseImplicitIncludeInfo.cmake: new parser that extracts the compiler's include path from verbose output. If the parser cannot parse the output, we fall back to the old behavior. On osx we skip over framework directories (handled elsewhere). - CMakeDetermineCompilerABI.cmake: - use verbose flag in try_compile for ${src} - use new cmake_parse_implicit_include_info() to attempt extract implicit include directory path and if successful set CMAKE_${LANG}_IMPLICIT_INCLUDE_DIRECTORIES - CMakeCCompiler.cmake.in and CMakeCXXCompiler.cmake.in - preserve CMAKE_${LANG}_IMPLICIT_INCLUDE_DIRECTORIES value between runs in the same way CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES is preserved - Tests/RunCMake/ParseImplicitIncludeInfo: tests for parse based on the older Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in. The test runs a set of verbose compiler outputs collected from various machines through the parser and checks the results. New compiler files can be added by dropping input/output files in the ParseImplicitIncludeInfo/data subdirectory and then adding the new set of files to the ${targets} list in ParseImplicitIncludeInfo.cmake. There is a helper CMakeLists.txt in ParseImplicitIncludeInfo/data that can help with the generation of test input files. NOTE: the standard cmake pre-commit hook rejects verbose compiler output with trailing spaces... you have to manually edit them out. This shouldn't impact the test. Note that both the parser and the test code can use CMAKE_${LANG}_COMPILER_* variables such as ${CMAKE_CXX_COMPILER_ID} to decide how to parse verbose compiler output. For the test code, this requires us to save the variables values in the test input files. Fixes: #16291
* Properties: Add CMAKE_ROLE global propertyKyle Edwards2019-01-171-0/+1
| | | | | This property allows scripts to determine whether they're in project mode, script mode, find-package mode, CTest, or CPack.
* Merge topic 'vs2019'Brad King2019-01-151-1/+1
|\ | | | | | | | | | | | | | | | | | | 57e48f16f2 VS: Add Visual Studio 16 2019 generator bdef729646 VS: Parameterize VS 2017 generator to support future versions 68d316e0cf VS: Rename VS 2017 generator sources to be version-independent d8ed309d05 VS: Parameterize cmVSSetupAPIHelper instances with VS version Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2789
| * VS: Add Visual Studio 16 2019 generatorBrad King2019-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add this generator *without* support for specifying the target architecture in the generator name. cmake-gui will be taught to provide a field for this, and command-line builds can use -A. Also, teach this generator to select a default target architecture based on the host architecture. Fixes: #18689 Inspired-by: Egor Pugin <egor.pugin@gmail.com>
* | Merge topic 'autogen_noqt_warning'Brad King2019-01-141-0/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | 0377fe1e2b Merge branch 'backport-autogen_noqt_warning' into autogen_noqt_warning dd39da5518 Tests: Add case for warning when AUTOMOC/UIC/RCC gets disabled f44a0414ae Autogen: Issue a warning when AUTOMOC/UIC/RCC gets disabled. 5ae69f5919 Autogen: Issue a warning when AUTOMOC/UIC/RCC gets disabled. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2787
| * Merge branch 'backport-autogen_noqt_warning' into autogen_noqt_warningBrad King2019-01-111-0/+1
| |\
| | * Tests: Add case for warning when AUTOMOC/UIC/RCC gets disabledBrad King2019-01-111-0/+1
| | |
* | | Merge topic 'vs_ce_support'Brad King2019-01-111-0/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5e4887e673 VS: Honor WinCE deployment properties in VS 2010+ a4332cac4b Tests: Detect VS and SDK availability early Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2680
| * | | VS: Honor WinCE deployment properties in VS 2010+Wil Stark2019-01-101-0/+3
| |/ / | | | | | | | | | Previously only VS 2008 was supported.
* | | Tests: Split CPack DEB and RPM tests into smaller testsKyle Edwards2019-01-101-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | The DEB and RPM tests are quite large, which can result in CTest clients timing out on these tests even though they're working properly. The RPM test in particular causes a lot of timeouts on the CMake dashboard machines. This change splits these tests into smaller tests so that they don't time out.
* | | Tests: Add infrastructure to split up large CPack testsKyle Edwards2019-01-101-1/+6
|/ / | | | | | | | | This allows CPack generator tests to be split into smaller tests of the format "<generator>.<test>".
* | Tests: Pass python interpreter into RunCMake.CTestCommandLineBrad King2019-01-081-1/+2
| | | | | | | | This will be useful for adding python-based result checks.
* | Merge topic 'fileapi'Brad King2018-12-131-0/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b9c6f08276 Help: Add release note for fileapi feature 4b6b2a571c fileapi: extend codemodel v2 with directory details eb8c7676a4 fileapi: extend codemodel v2 with a project model 42f0125ceb fileapi: Add test for cmakeFiles v1 6615408193 fileapi: add cmakeFiles v1 3f6ee75a66 fileapi: Add test for cache v2 7489e95b8e fileapi: add cache v2 ea0a060168 fileapi: Add test for codemodel v2 ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2706
| * | fileapi: Add protocol v1 infrastructure with support for shared query filesBrad King2018-12-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a file-based API that clients may use to get semantic information about the buildsystem that CMake generates. Clients will write query files under a designated location in the build tree, and CMake will write reply files for clients to read. Start with support for shared stateless query files. These allow clients to share requests for major object versions and get all those recognized by CMake. Once any client has written a shared request to a build tree it will persist. Other clients will not need to overwrite the request (since it is stateless) and should not remove it either. For now we add only an undocumented object kind to use for testing the query and reply infrastructure. Object kinds providing real semantic information will be added later. Issue: #18398
* | | UseSWIG: add management of SWIG option -moduleMarc Chevrier2018-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | When file property SWIG_MODULE_NAME is specified, provide option -module to SWIG compiler. Fixes: #18374
* | | try_compile/try_run: Add support for LINK_OPTIONS option.Marc Chevrier2018-12-011-1/+3
|/ /
* | Merge topic 'ctest-stdin'Brad King2018-11-191-1/+2
|\ \ | |/ | | | | | | | | | | | | 86e8315482 CTest: Restore inheritance of stdin by test processes bdec3bd896 Tests: Teach RunCMake infrastructure to optionally provide stdin Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2618
| * CTest: Restore inheritance of stdin by test processesBrad King2018-11-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | Since commit v3.11.0-rc1~117^2 (CTest: Re-implement test process handling using libuv, 2017-12-10) we do not give the child test processes any stdin. Prior to that change we let the child test processes inherit stdin from ctest itself. Tests that run serially might be able to use the real stdin meaningfully, so restore that behavior and add a test case. Fixes: #18591
| * Merge branch 'rename-cpack-ext-generator' into release-3.13Brad King2018-11-061-1/+1
| |\ | | | | | | | | | Merge-request: !2566
| * \ Merge branch 'set_directory_properties-script-mode' into release-3.13Brad King2018-10-291-0/+1
| |\ \ | | | | | | | | | | | | Merge-request: !2544
* | \ \ Merge topic 'test-WriteBasicConfigVersionFile'Brad King2018-11-151-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f3a381115f Tests: Simplify RunCMake.WriteBasicConfigVersionFile 0dbcc1afbf Tests: Factor out RunCMake.WriteBasicConfigVersionFile test Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2612
| * | | | Tests: Factor out RunCMake.WriteBasicConfigVersionFile testBrad King2018-11-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The `WriteBasicConfigVersionFile` section of the `FindPackageTest` is independent of the rest.
* | | | | Tests: Add option for custom RunCMake.XcodeProject timeoutBrad King2018-11-141-0/+7
|/ / / / | | | | | | | | | | | | The test has many cases and can take a long time on busy machines.
* | | | POSITION_INDEPENDENT_CODE: Manage link flags for executablesMarc Chevrier2018-11-111-1/+2
| | | | | | | | | | | | | | | | Fixes: #14983, #16561
* | | | Merge topic 'rename-cpack-ext-generator'Brad King2018-11-061-1/+1
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | 20d5e77a27 CPack: Rename Ext generator to External Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2566
| * | | CPack: Rename Ext generator to ExternalCraig Scott2018-11-051-1/+1
| |/ / | | | | | | | | | | | | Ext and External were used inconsistently in the code and the docs. This change converts all uses of Ext to External, including within variable names used by the generator.
* | | Merge topic 'check-keywords-only-if-used'Brad King2018-11-021-0/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4babc9058a cmTargetPropCommandBase: check keywords after parsing 45a49ae58a cmTargetPropCommandBase: simplify code path 9f64974f5e cmTargetPropCommandBase: skip property setting if there's nothing to add 4201a11c2b Tests: add tests for empty-value keyword arguments in target_* Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2514
| * | | Tests: add tests for empty-value keyword arguments in target_*Ben Boeckel2018-10-261-0/+5
| |/ / | | | | | | | | | | | | | | | Not all of these commands accept non-compilable (i.e., IMPORTED) targets, so those calls are currently just commented out. If they ever do start to accept them, the tests should be enabled.
* | | Merge topic 'set_directory_properties-script-mode'Brad King2018-10-301-0/+1
|\ \ \ | |/ / |/| / | |/ | | | | | | 50572d638b set_directory_properties: Restore in script mode Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2544
| * set_directory_properties: Restore in script modeBrad King2018-10-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Since commit v3.10.0-rc1~391^2~3 (Add directory property 'LABELS' and CMAKE_DIRECTORY_LABELS variable, 2017-06-23) this command was accidentally not allowed in script mode. It was dropped because `ctest -S` mode needs to start with CMake's normal script mode and then replace the `set_directory_properties` implementation. Restore the normal `set_directory_properties` in script mode and then add special logic to replace it in ctest. Also add a test case. Fixes: #18523