summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Ninja: Match showIncludes dependencies using console output code pageBrad King2022-10-301-0/+4
| | | | | | | | | Generalize the fix from commit 37a279f8d1 (Ninja: Write msvc_deps_prefix as UTF-8 when console codepage is UTF-8, 2020-07-31, v3.19.0-rc1~349^2). `cl /showIncludes` output is encoded using the console output code page, so this is the byte sequence that Ninja must use to match its lines. Fixes: #24068
* Tests: Test more CMakeTest*Compiler.cmake fallbacksBrad King2022-09-291-0/+9
| | | | | Extend the test added by commit f891a75d5c (Tests: Test CMakeTest*Compiler.cmake fallbacks, 2022-09-27) to cover more languages.
* Merge topic 'compiler-tests'Brad King2022-09-291-0/+4
|\ | | | | | | | | | | | | | | f891a75d5c Tests: Test CMakeTest*Compiler.cmake fallbacks Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7722
| * Tests: Test CMakeTest*Compiler.cmake fallbacksMatthew Woehlke2022-09-281-0/+4
| | | | | | | | | | | | | | | | | | Add tests that explicitly test the fallback tests of the modules which test for a functional [Obj]C[xx] compiler, bypassing the ABI tests. Due to the ABI test short-circuiting added by commit 1d21dd0f7c (enable_language: Assume compiler works if ABI detection compiles, 2020-05-25, v3.18.0-rc1~93^2), this logic is likely not getting tested otherwise.
* | cmake: Add --workflow modeKyle Edwards2022-09-271-0/+4
|/ | | | Fixes: #23118
* Merge topic 'modernize-build-self'Brad King2022-09-231-3/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9629be8080 Build: Use `CMAKE_CURRENT_XXX_DIR` instead of top dirs e6fb5a1feb Build: Sort linked libraries list of `CMakeLib` aa7290e8dc Build: Use imported target `Threads::Threads` instead of variable df8ad72ffa Build: Use imported target `kwiml::kwiml` instead of variables eeebf31e54 Build: Use imported target `LibRHash::LibRHash` instead of variables 08be01a181 Build: Use imported target `LibUV::LibUV` instead of variables ddac6dcbe8 Build: Use imported target `JsonCpp::JsonCpp` instead of variables ac76c53d33 Build: Use imported target `CURL::libcurl` instead of variables ... Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7570
| * Build: Modernize some `foreach` calls to use `IN LISTS`/`IN ITEMS`Alex Turbov2022-09-221-3/+5
| |
* | Genex LINK_LIBRARY: Add support for framework with postfixMarc Chevrier2022-09-211-0/+2
|/
* MSVC: Add abstraction for debug information formatGlen Chung2022-09-141-0/+1
| | | | | | | | | | | | | | | | Replace our hard-coded default for `/Zi` with a first-class abstraction to select the debug information format an enumeration of logical names. We've long hesitated to do this because the idea of "debug information format" 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 flag 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 CMP0141 to provide compatibility. Fixes: #10189
* CPack: Add support for presetsKyle Edwards2022-08-311-0/+4
| | | | Fixes: #23117
* Add new flow-control commands for variables and policies scopes managementMarc Chevrier2022-08-221-0/+1
| | | | | | | Add block() and endblock() commands offering the capability to create new scopes for variables and/or policies. Fixes: #20171
* Tests: Fix RunCMake.FileAPI test with jsoncpp < 1.7.5Brad King2022-08-181-0/+3
| | | | | | | Prior to jsoncpp commit `126bdc2b05` (Reject extra chars if strictRoot, 2016-08-21, 1.7.5~2), it did not diagnose trailing characters in the input after a JSON value. Teach our corresponding test case to tolerate the old behavior.
* Merge topic 'export-no-shdeps'Brad King2022-08-161-0/+1
|\ | | | | | | | | | | | | 0ebff0d61a export: Restore exclusion of private shared library dependencies from checks Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7557
| * export: Restore exclusion of private shared library dependencies from checksBrad King2022-08-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | Refactoring in commit 8c65b7042e (cmExportFileGenerator: Simplify collection of targets missing from export set, 2022-04-11, v3.24.0-rc1~281^2) accidentally dropped the behavior change from commit 0ad2a1c181 (Export: Never treat private link libraries as public package dependencies., 2013-09-24, v3.0.0-rc1~559^2). Restore the behavior and add a test. Fixes: #23838
* | Tests: Exclude win/arm64 tests with CMAKE_VS_PLATFORM_NAMENiyas Sait2022-07-051-1/+1
| |
* | Merge topic 'add_nvcc_compile_warning_support'Brad King2022-07-051-1/+2
|\ \ | |/ | | | | | | | | | | | | cd324110d2 CUDA: NVCC support for COMPILE_WARNING_AS_ERROR target property 2e9ac1d272 Tests: Refactor warn on error tests to support multiple languages Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7417
| * CUDA: NVCC support for COMPILE_WARNING_AS_ERROR target propertyRobert Maynard2022-07-011-1/+2
| |
* | Tests/RunCMake/CXXModules: add module-using examplesBen Boeckel2022-06-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes a number of examples that should work for various levels of support in a compiler. There are a number of tests which are gated on various features in the compilers. To enable the tests, set `CMake_TEST_MODULE_COMPILATION` to a comma-separated (to avoid `;`-escaping problems) to the list of features which are supported: - `named`: Named modules are supported. - `shared`: Shared libraries with module usage at the API boundary are supported. - `partitions`: Named module partitions are supported. - `internal_partitions`: Named module internal partitions are supported. Additionally, a `CMake_TEST_MODULE_COMPILATION_RULES` file must be passed which contains the rules for how to build modules using the provided compiler. It will be included in the tests to provide these rules. To verify that the file provided works as intended, it must set `CMake_TEST_CXXModules_UUID` to a specific version to indicate that it is an expected file.
* | cmTarget: add support for C++ module fileset typesBen Boeckel2022-06-161-0/+3
|/ | | | | | | | | | | | | | | C++ modules have two variants which are of importance to CMake: - `CXX_MODULES`: interface modules (those using `export module M;`, `export module M:part;`, or `module M:internal_part;`) - `CXX_MODULE_HEADER_UNITS`: importable header units Creating C++ modules or partitions are *not* supported in any other source listing. This is because the source files must be installed (so their scope matters), but not part of usage requirements (what it means for a module source to be injected into a consumer is not clear at this moment). Due to the way `FILE_SET` works with scopes, they are a perfect fit as long as `INTERFACE` is not allowed (which it is not).
* MSVC: Revert "Default to -ZI instead of /Zi for x86 and x64"Brad King2022-06-091-3/+0
| | | | | | | | | | | | | | Revert commit 5fcadc481e (MSVC: Default to -ZI instead of /Zi for x86 and x64, 2022-05-24). The `-ZI` flag is incompatible with the `-GL` flag used for IPO, and so is not an unconditionally better default. Revert the change pending future design of a first-class setting for MSVC debug info format that can be automatically reconciled with IPO settings. That commit introduced policy CMP0138, but we already have later policy numbers used too. Leave placeholder text to avoid policy renumbering. Issue: #23607, #10189
* Merge topic 'print-sources'Brad King2022-06-071-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | d8dcfa7776 Tests: Add tests for CMakePrintHelpers b7ddfcfe08 cmake_print_properties(): Update grammar docs e52b9e1270 PrintHelpers: Document argument order restriction d87ed4d88f PrintHelpers: Fix indentation 5fa70e1738 PrintHelpers: Rewrite a few more error messages 2579503f45 PrintHelpers: Fix target SOURCES property Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7331
| * Tests: Add tests for CMakePrintHelpersFeRD (Frank Dana)2022-06-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add three tests in Tests/RunCMake/PrintHelpers, meant to verify basic functionality of the module. Tests are: * Variables: Test the results of a cmake_print_variables() call on two variables set within the test script. * Properties: Test cmake_print_properties() calls on a pair of SOURCES and a pair of TARGETS, printing some basic properties. * PropertiesSources: Specifically verify the results of a cmake_print_properties() call for the SOURCES property of a TARGET. Prior to the fix introduced alongside these tests, it was a known bug that such a request caused a FATAL_ERROR.
* | if command: Add PATH_EQUAL operatorMarc Chevrier2022-06-031-0/+1
|/
* Genex-PATH_EQUAL: path comparisonMarc Chevrier2022-06-011-0/+1
| | | | To complete issue #23498
* Genex-PATH: path handlingMarc Chevrier2022-05-311-0/+1
| | | | Fixes: #23498
* Merge topic 'msvc-compilers-default-to-ZI'Brad King2022-05-271-0/+3
|\ | | | | | | | | | | | | 5fcadc481e MSVC: Default to -ZI instead of /Zi for x86 and x64 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7295
| * MSVC: Default to -ZI instead of /Zi for x86 and x64Glen Chung2022-05-261-0/+3
| | | | | | | | | | | | | | | | | | | | Add a policy for compatibility. For more information, see [1]. [1] https://docs.microsoft.com/en-us/cpp/build/reference/z7-zi-zi-debug-information-format?view=msvc-170 Fixes: #10189
* | Dependency providers: Add find_package and FetchContent supportCraig Scott2022-05-241-0/+1
|/ | | Fixes: #22619
* Merge topic 'vs-arm64-tests'Brad King2022-05-121-1/+3
|\ | | | | | | | | | | | | 834422e075 Tests: Fix test failures for Windows Arm64 platforms Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7251
| * Tests: Fix test failures for Windows Arm64 platformsNiyas Sait2022-05-111-1/+3
| |
* | Merge topic 'werror-property'Brad King2022-05-101-0/+1
|\ \ | |/ |/| | | | | | | | | | | | | 76a08cd253 COMPILE_WARNING_AS_ERROR: Add options to treat warnings as errors Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Acked-by: Michael Hirsch <michael@scivision.dev> Merge-request: !7187
| * COMPILE_WARNING_AS_ERROR: Add options to treat warnings as errorsMartin Duffy2022-05-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add `COMPILE_WARNING_AS_ERROR` target property and supporting `CMAKE_COMPILE_WARNING_AS_ERROR` variable. `COMPILE_WARNING_AS_ERROR` is initialized by `CMAKE_COMPILE_WARNING_AS_ERROR`. It is a boolean variable. If it is true, it expands to a different flag depending on the compiler such that any warnings at compile will be treated as errors. Supports compiler ids that I could find a relevant flag for.
* | Merge topic 'FetchContent_find_package_integration'Craig Scott2022-05-061-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 29e31e2825 Packages: Integrate FetchContent and find_package() Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: huangqinjin <huangqinjin@gmail.com> Merge-request: !5688
| * | Packages: Integrate FetchContent and find_package()Craig Scott2022-05-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Allow FetchContent_MakeAvailable() to try a call to find_package() first, or redirect a find_package() call to FetchContent_MakeAvailable(). The user can set variables to control which of these are allowed or tried by default. Fixes: #21687
* | | ExternalProject: Add DOWNLOAD_EXTRACT_TIMESTAMP option and policyKasper Laudrup2022-05-041-0/+1
|/ / | | | | | | | | | | | | | | | | | | Add the option to keep the current filestamps when extracting an archive in ExternalProject_Add. Enabling this option makes the behavior consistent with how ExternalProject_Add is used when checking out code from revision control instead of an archive. Fixes: #22746
* | CMake: Use FindPython instead of FindPythonInterp to build CMake itselfKyle Edwards2022-04-211-8/+8
| | | | | | | | Fixes: #23444
* | Xcode: Add tests for OBJECT library per target `OSX_ARCHITECTURES`Hyper Nova Sun2022-04-121-0/+3
|/ | | | | | | | | | | | | | | | | Added test to cover handling of when `CMAKE_OSX_ARCHITECTURES` differs from OBJECT library target's `OSX_ARCHITECTURES`: TargetOverrideSingleArch: - When `CMAKE_OSX_ARCHITECTURES` is set to multiple archs, - But OBJECT library's `OSX_ARCHITECTURES` is set to single - Assert that OBJECT library target "`HasKnownObjectFileLocation`" and is installable TargetOverrideMultiArch: - When `CMAKE_OSX_ARCHITECTURES` is set to single arch, - But OBJECT library's `OSX_ARCHITECTURES` is set to multiple - Assert that OBJECT library target does not "`HasKnownObjectFileLocation`" and hence not installable
* Merge topic 'verify-header-sets'Brad King2022-03-301-0/+2
|\ | | | | | | | | | | | | | | c798744f81 FILE_SET: Add VERIFY_HEADER_SETS target property Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7085
| * FILE_SET: Add VERIFY_HEADER_SETS target propertyKyle Edwards2022-03-291-0/+2
| | | | | | | | Fixes: #23338
* | Merge topic 'set-env-var-first-run'Brad King2022-03-291-4/+8
|\ \ | |/ |/| | | | | | | | | | | 05e510bf0b CMP0132: Don't set compiler environment variables on first run 774a9eb210 Tests: Reorder CMP0129 test Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7108
| * CMP0132: Don't set compiler environment variables on first runCraig Scott2022-03-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | When running CMake for the first time in a build tree, for some generators CMake would set compiler environment variables like CC, CXX, etc. when the corresponding language is enabled. That behavior was never documented and can result in different behavior between the first and subsequent runs. Add a policy to no longer set those environment variables. Fixes: #21378
| * Tests: Reorder CMP0129 testCraig Scott2022-03-261-4/+6
| | | | | | Move the CMP0129 tests up to be with the other policy tests.
* | Tests: Add Matlab label to Matlab-related testsSilvio2022-03-251-0/+1
|/
* Merge topic 'color-diagnostics'Brad King2022-03-091-0/+3
|\ | | | | | | | | | | | | | | | | | | | | 6ab9fbd43b color: Add tests for CMAKE_COLOR_DIAGNOSTICS 78adb1b952 color: Add CMAKE_COLOR_DIAGNOSTICS environment variable 884d9de8b7 color: Introduce CMAKE_COLOR_DIAGNOSTICS variable Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: Frank Dana <ferdnyc@gmail.com> Merge-request: !6990
| * color: Add tests for CMAKE_COLOR_DIAGNOSTICSBrad King2022-03-081-0/+3
| |
* | Genex-LINK_GROUP: Add possibility to group libraries at link stepMarc Chevrier2022-02-281-0/+13
| | | | | | | | Fixes: #23121
* | Merge topic 'test-qt-disable'Brad King2022-02-181-4/+8
|\ \ | | | | | | | | | | | | | | | | | | 5bfff3c750 Tests: Add missing guards on Qt4 and Qt5 tests Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6998
| * | Tests: Add missing guards on Qt4 and Qt5 testsBrad King2022-02-171-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | Add missing `CMake_TEST_Qt{4,5}` conditions on Qt4 an Qt5 tests. Configuring CMake with `-DCMake_TEST_Qt5=OFF` should prevent any attempt to search for Qt5. Fixes: #23239
* | | GenEx/LINK_LIBRARY: Add features for framework support on AppleMarc Chevrier2022-02-151-0/+1
| |/ |/|
* | Merge topic 'clang-cross-compile-windows-pdb'Brad King2022-02-101-1/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | 641cb1093b Windows/Clang: Support PDB when cross-compiling Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Alex <leha-bot@yandex.ru> Merge-request: !6959