Commit Graph

8410 Commits

Author SHA1 Message Date
Brad King 432de16343 Merge topic 'dev/safreed/invalidconfigurepreset'
bc663dc333 Merge branch 'master' into invalid-configure-preset
b9eb3541cf Tests: update tests to catch invalid configurePreset at read-time
83eeeff7dc Fail at read-time if configurePreset field invalid

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5912
2021-03-17 09:14:55 -04:00
Brad King abf9f25d6f Merge topic 'tests-for-xctest_add_bundle'
74eda8ab1f Tests: Add XCTest cases to cover output directory selection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5888
2021-03-16 10:52:28 -04:00
Kyle Edwards bc663dc333 Merge branch 'master' into invalid-configure-preset 2021-03-16 10:16:02 -04:00
Sam Freed b9eb3541cf Tests: update tests to catch invalid configurePreset at read-time 2021-03-15 14:53:00 -07:00
Kyle Edwards 0d497e159b CMakePresets.json: Add ${hostSystemName} macro 2021-03-15 14:41:42 -04:00
Yauheni Khnykin 74eda8ab1f Tests: Add XCTest cases to cover output directory selection
Fixes: #21800
2021-03-13 00:54:25 +01:00
Brad King 9a80ce6d24 Merge topic 'add_prefix_cmake_option'
400536c317 cmCommandLineArgument: trim leading empty spaces
b227a9565e cmake: configure preset add support for --install-prefix mapping
38140713ad cmake: add support for --install-prefix command argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5843
2021-03-11 08:16:03 -05:00
Brad King 0d7389c04e Merge topic 'cpack-source-dir-symlink-test'
f42b048b9c Tests: Check symlinks to directories in RunCMake.CPackSymlinks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5887
2021-03-11 08:14:19 -05:00
Brad King 00eb4df37e Merge topic 'file-COPY_FILE-subcommand'
088444211e file: add `COPY_FILE` subcommand
100016e9cb cmSystemTools: add utilities to copy a file with error handling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5885
2021-03-11 08:13:29 -05:00
Brad King 4606082742 Merge topic 'xcode-framework-quoting' into release-3.20
4f9a71974e Xcode: Restore support for spaces in framework names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5899
2021-03-11 08:10:42 -05:00
Brad King e6695c7ad5 Merge topic 'xcode-framework-quoting'
00ecddd9eb Tests: Enable Framework test case with spaces everywhere possible
b6cc9be009 Merge branch 'backport-xcode-framework-quoting' into xcode-framework-quoting
4f9a71974e Xcode: Restore support for spaces in framework names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5899
2021-03-11 08:10:42 -05:00
Olivier Iffrig f42b048b9c Tests: Check symlinks to directories in RunCMake.CPackSymlinks
Regression test for issue #21886
2021-03-10 17:39:55 +00:00
Brad King 03193a9e9a Merge topic 'ep-fc-revert-refactoring'
57d442e182 Revert ExternalProject and FetchContent refactoring

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5898
2021-03-10 11:37:15 -05:00
Brad King fb40808b76 Merge topic 'test-ifort-windows'
7b0ab0439d Tests: Fix FortranModules test with Intel compiler on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5894
2021-03-10 11:23:23 -05:00
Brad King dad1732e45 Merge topic 'test-RunCMake-fail-info'
e8065554a8 Tests: Teach RunCMake to always print the command on failure
5f03744e36 Tests: Move RunCMake option construction closer to use
f4d154755a Tests: Reverse RunCMake code path order
6fd7e8c53f Tests: Make RunCMake.Generator{Platform,Toolset} two-flag cases explicit

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5892
2021-03-10 11:21:54 -05:00
Ben Boeckel 088444211e file: add COPY_FILE subcommand
The `file(COPY)` subcommand is overloaded and busy for such a simple
operation. Instead, make a simpler subcommand with error handling
support.
2021-03-10 10:43:18 -05:00
Brad King 00ecddd9eb Tests: Enable Framework test case with spaces everywhere possible 2021-03-10 10:04:05 -05:00
Brad King b6cc9be009 Merge branch 'backport-xcode-framework-quoting' into xcode-framework-quoting 2021-03-10 10:03:36 -05:00
Brad King 4f9a71974e Xcode: Restore support for spaces in framework names
In commit ce2dee9e5b (Xcode: Don't add framework as -framework argument
in linker info list, 2020-09-28, v3.19.0-rc1~47^2) we split up the path
to a framework into the directory and framework name parts, but only
retained the quoting on the directory part.  Restore quoting of the
framework name.

Fixes: #21910
2021-03-10 10:01:11 -05:00
Craig Scott 57d442e182 Revert ExternalProject and FetchContent refactoring
Refactoring of the ExternalProject and FetchContent modules moved
the commands into CMake scripts. This broke custom commands that
used shell redirection or special build tool variables of the form
$(MakeVar). Undo the sequence of commits that performed this
refactoring and follow-up fixes associated with it.

The following commits are reverted by this change:

4f3d1abbb4 (ExternalProject: Refactor pre-configure steps to support
no-target uses, 2021-02-05)

17e5516e60 (FetchContent: Invoke steps directly and avoid a separate
sub-build, 2021-01-29)

bd876f3849 (FetchContent: Restore patch command support,
2021-02-18)

404cddb7bb (ExternalProject: Fix misuse of IS_NEWER_THAN in
timestamp checks, 2021-02-21)

b0da671243 (FetchContent: Don't update timestamps if files don't
change, 2021-02-18)

Fixes: #21892
2021-03-10 09:07:44 +11:00
Robert Maynard b227a9565e cmake: configure preset add support for --install-prefix mapping 2021-03-09 13:53:16 -05:00
Brad King 7b0ab0439d Tests: Fix FortranModules test with Intel compiler on Windows
The test regularly fails updating the `vc*.pdb` compiler-generated
PDB file.  Add the `/Z7` flag as the compiler suggests for this.
2021-03-09 09:22:32 -05:00
Brad King d03732bc65 Merge topic 'soname-spaces'
7621861f30 Tests: Update LibName to cover spaces in shared library name
388eb83c09 Tests: Enable MAKE_SUPPORTS_SPACES tests with Ninja generators
c0a3317497 Ninja: Escape SONAME on linker command line
9dfa7981d5 Makefiles: Escape SONAME on linker command line

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5880
2021-03-09 09:17:43 -05:00
Brad King e8065554a8 Tests: Teach RunCMake to always print the command on failure
Previously we only printed explicit `RunCMake_TEST_COMMAND` cases on
failure.  Refactor the RunCMake infrastructure so that we always define
`RunCMake_TEST_COMMAND` internally, and print it on failure.
2021-03-09 07:43:29 -05:00
Brad King 5f03744e36 Tests: Move RunCMake option construction closer to use 2021-03-09 07:35:18 -05:00
Brad King f4d154755a Tests: Reverse RunCMake code path order 2021-03-09 07:35:18 -05:00
Brad King 6fd7e8c53f Tests: Make RunCMake.Generator{Platform,Toolset} two-flag cases explicit
Do not rely on the RunCMake infrastructure to pass `-T` or `-A`.
2021-03-09 07:35:18 -05:00
Brad King 7621861f30 Tests: Update LibName to cover spaces in shared library name 2021-03-08 13:03:21 -05:00
Brad King 388eb83c09 Tests: Enable MAKE_SUPPORTS_SPACES tests with Ninja generators 2021-03-08 13:03:21 -05:00
Brad King 15610d42fe Merge topic 'file-RENAME'
9bf40d8027 file(RENAME): Add option to not replace existing path
3600c6cd8c cmSystemTools: Add RenameFile option to not replace destination
c61292726c file(RENAME): Add option to capture error message on failure
0c2dc34504 cmSystemTools: Add RenameFile signature to capture the error message
adc351db8f Tests: Add RunCMake helper to run a plain script

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5877
2021-03-05 08:27:18 -05:00
Robert Maynard 38140713ad cmake: add support for --install-prefix command argument
Fixes: #21781
2021-03-04 10:50:24 -05:00
Brad King 9bf40d8027 file(RENAME): Add option to not replace existing path
Add a `NO_REPLACE` option that prevents overwriting `<newname>`
if it exists.
2021-03-04 08:49:48 -05:00
Brad King c61292726c file(RENAME): Add option to capture error message on failure 2021-03-04 08:44:06 -05:00
Brad King adc351db8f Tests: Add RunCMake helper to run a plain script
Many tests covering CMake scripting commands can work without
initializing a full generator.
2021-03-03 16:41:30 -05:00
Brad King fd714dd2b8 Tests: Fix FindPackageModeMakefileTest with CMAKE_OSX_ARCHITECTURES 2021-03-03 10:29:53 -08:00
Brad King 42edf53ce2 Tests: Generalize FindPackageModeMakefileTest extra flags var 2021-03-03 10:29:35 -08:00
Brad King 957a117c70 Merge topic 'android-r22'
005e2cdfb0 Android: Do not use gold for ndk >= r22
ed7a87f270 Tests: Update RunCMake.Android for NDK r22
4950d35733 Help: Document CMAKE_ANDROID_NDK_VERSION variable
746906242d Android: Detect NDK version number

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5862
2021-03-03 11:11:58 -05:00
Brad King ed7a87f270 Tests: Update RunCMake.Android for NDK r22
Use `CMAKE_ANDROID_NDK_VERSION` to check for files expected based
on the version of the NDK.
2021-03-03 10:27:50 -05:00
Raul Tambre 82239d43f8 Clang: C17 default version
Switched in LLVM commit 91cdbd521a38495c66e30636943563ca70d3c022, released in
Clang 11.

Issue: #17755
2021-02-25 18:22:29 +02:00
Raul Tambre dcd599757f C23 support 2021-02-25 18:22:10 +02:00
Raul Tambre 93b7d3d292 C17 support
Implements #17755.
2021-02-25 18:22:10 +02:00
Raul Tambre 7596d8b951 CMakeCCompilerId: Fix C standard detection in Clang MSVC mode
Clang doesn't define __STDC__ if in MSVC compatibility mode, but does define
__STDC_VERSION__.
Avoid the fallback for this combination.
2021-02-25 18:22:07 +02:00
Kyle Edwards f31e8d33ef Genex: Fix grammatical error in TARGET_OBJECTS error message 2021-02-24 14:55:17 -05:00
Kyle Edwards d34d28e688 Genex: Add TARGET_RUNTIME_DLLS genex
Co-Authored-by: Brad King <brad.king@kitware.com>
2021-02-24 14:55:17 -05:00
Brad King b4a103bdec Merge topic 'autouic-headers-ninja'
1265c65b33 AUTOUIC: Collect ui header files for Ninja generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5803
2021-02-24 09:49:03 -05:00
Brad King e95f7aa0ed Merge topic 'preset-flag-consistency' into release-3.20
6fa3647023 ctest: Add support for '--prefix=<prefix>' form of the argument
3357d37761 cmake: Add support for '--build --prefix=<prefix>' form of the argument
2f13fdef0a cmake: Document '--preset <preset>' form of the argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5849
2021-02-24 09:46:52 -05:00
Brad King 414cfc6ecb Merge topic 'preset-flag-consistency'
6fa3647023 ctest: Add support for '--prefix=<prefix>' form of the argument
3357d37761 cmake: Add support for '--build --prefix=<prefix>' form of the argument
2f13fdef0a cmake: Document '--preset <preset>' form of the argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5849
2021-02-24 09:46:52 -05:00
Brad King d4ce3d65f3 Merge topic 'LINK_LANGUAGE-genex-respects-LINKER_LANGUAGE-property'
b722eea925 Genex: LINK_LANGUAGE respects LINKER_LANGUAGE property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5841
2021-02-24 09:45:51 -05:00
Brad King 14c6a88db6 Merge topic 'LINK_LANGUAGE-genex-respects-LINKER_LANGUAGE-property' into release-3.20
b722eea925 Genex: LINK_LANGUAGE respects LINKER_LANGUAGE property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5841
2021-02-24 09:45:50 -05:00
Brad King 261ba00668 Merge topic 'autogen-cmp0116-fix' into release-3.20
339dbc901f Help: Note that CMP0116 is recorded at the time of CC creation
e3740e020e Tests: Test Qt autogen target with CMP0116 set to WARN
cf34011ce7 Tests: Test per-CC behavior of CMP0116
3a95503512 Ninja: Use CMP0116 status recorded at time of custom command's creation
f01f10e8fb cmCustomCommand: Record value of CMP0116 at time of creation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5848
2021-02-24 09:44:59 -05:00