Commit Graph

60685 Commits

Author SHA1 Message Date
Kitware Robot a50b278512 CMake Nightly Date Stamp 2023-01-27 00:01:12 -05:00
Brad King ed09c0aecd Merge topic 'configure_file_docs_use_target_inc_dirs'
c89d467bf2 Help: configure_file doc example use `target_include_directories`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8121
2023-01-26 09:16:37 -05:00
Brad King 6dca2dd86d Merge topic 'xcode-swift-inherited-flags'
01c1d81527 Xcode: Inherit Swift flags and compilation conditions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8122
2023-01-26 09:15:57 -05:00
Brad King d693c35ea6 Merge topic 'watcom-win16'
e194caa5a3 OpenWatcom: Add correct support for 16-bit Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8116
2023-01-26 09:13:25 -05:00
Brad King 1f97d068ac Merge topic 'jmalak-master-patch-watcomquote'
a1d065e5c7 Watcom: Replace WATCOMQUOTE format by UseWatcomQuote attribute

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8115
2023-01-26 09:12:14 -05:00
Brad King eb130c0864 Merge topic 'vs-BuildInParallel'
8024c41685 VS: Do not concurrently build custom commands with generated MAIN_DEPENDENCY

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8120
2023-01-26 09:11:08 -05:00
Kitware Robot 3c9766d3a2 CMake Nightly Date Stamp 2023-01-26 00:01:10 -05:00
Ross Kilgariff 01c1d81527 Xcode: Inherit Swift flags and compilation conditions
Extend the change from commit dfaf55fbfd (Xcode: add extra
'$(inherited)' entries using InheritBuildSettingAttribute, 2021-05-03,
v3.21.0-rc1~182^2) to cover Swift flags and compilation conditions,
allowing CocoaPods and CMake to interoperate when used in the same
project.
2023-01-25 15:15:03 -05:00
Robert Maynard c89d467bf2 Help: configure_file doc example use target_include_directories
Fixes #24351
2023-01-25 12:30:15 -05:00
Jiri Malak e194caa5a3 OpenWatcom: Add correct support for 16-bit Windows
This add correct Open Watcom support for 16-bit Windows 3.x.
It replace existing strange mixture with WIN32 stuff which implement 16-bit Windows target partially as part of WIN32 stuff.
Now pre-defined OS ID Windows3x is used instead of confusing WIN32.
It support properly 16-bit and 32-bit application for 16-bit Windows host.
32-bit applications are build with OW WIN386 extender.

It is used similar as for other platforms by set CMAKE_SYSTEM_NAME=Windows3x and CMAKE_SYSTEM_PROCESSOR=I86 for 16-bit application or CMAKE_SYSTEM_PROCESSOR=x86 for 32-bit WIN386 extender application running on 16-bit Windows 3.x.
CMAKE_SYSTEM_NAME=Windows is used only for WIN32 applications.
2023-01-25 17:53:03 +01:00
Brad King 950effe434 Merge topic 'CheckCompilerFlag-clang'
5b45a3d0ce CheckCompilerFlag: Match the Clang "argument unused" output for all languages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8117
2023-01-25 11:19:21 -05:00
Brad King d1ba79da4f Merge topic 'FindOpenMP-test-include-dir'
6e53d74147 FindOpenMP: Use OpenMP_<lang>_INCLUDE_DIR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8110
2023-01-25 11:17:46 -05:00
Brad King e4cdd4206c Merge topic 'test-try_compile-matching'
7db4df2e8c Tests: Match configure log try_compile directories more precisely

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8114
2023-01-25 11:16:39 -05:00
Brad King 1d6d10cbf6 Merge topic 'isdir_empty'
a1dc38a567 Help: Document behavior of if(EXISTS,IS_DIRECTORY) for empty paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8109
2023-01-25 11:15:46 -05:00
Brad King 058f7189e1 Merge topic 'doc-rpath-features'
434be1256e Help: improve docs for INSTALL_NAME_DIR
f784c21567 Help: mention CMAKE_SKIP_RPATH in the RPATH docs
66ad61ba79 Help: improve documentation for BUILD_RPATH
25e7791dc1 Help: improve docs for INSTALL_RPATH
099292f123 Help: improve docs for rpath-related variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8073
2023-01-25 11:14:42 -05:00
Brad King ef0b05e497 Merge topic 'watcom-refactor-std-includes'
10623a51a0 OpenWatcom: Refactor population of standard include directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8113
2023-01-25 11:13:45 -05:00
Brad King 3c8a65d3aa Merge topic 'swiftmodule-dependency-tracking'
1730d208b5 Add incremental Swift static lib build test
bf3a8ef6d5 Ninja: Swift: Add dependency edge to swiftmodule file
d0b469b7e0 Ninja: NFC: refactor swift module name computations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8084
2023-01-25 11:11:37 -05:00
Brad King 8024c41685 VS: Do not concurrently build custom commands with generated MAIN_DEPENDENCY
Since commit 33c15ae2b9 (VS: Build custom commands concurrently when
possible, 2023-01-19) several tests have failed intermittently with the
VS generator.  It seems that if the `BuildInParallel` setting is
attached to a generated input:

    <CustomBuild Include="generated_input.txt">
      <BuildInParallel Condition="...">true</BuildInParallel>
      <Command Condition="...">copy geneated_input.txt output.txt</Command>
      ...
    </CustomBuild>

then MSBuild does not wait for the input to be generated before running
the command.

This occurs when using `add_custom_command`'s `MAIN_DEPENDENCY`, so
avoid using `BuildInParallel` in that case.

Issue: #18405
2023-01-25 10:59:44 -05:00
Kitware Robot 7a989a581c CMake Nightly Date Stamp 2023-01-25 00:01:15 -05:00
KOLANICH 5b45a3d0ce CheckCompilerFlag: Match the Clang "argument unused" output for all languages
Improve detection of missing compiler flags: move "argument unused
during compilation: .*" pattern from language-specific branches into
the common list.
2023-01-24 17:17:36 -05:00
Jiri Malak a1d065e5c7 Watcom: Replace WATCOMQUOTE format by UseWatcomQuote attribute
Replace WATCOMQUOTE output format by UseWatcomQuote attribute to properly handle single quote
This attribute is used globaly only for Watcom linker to handle single-quote separator instead of double-quote
it doesn't mean different output format only change of quoting separator
It is now applied to any output form SHELL/RESPONSE/NINJAMULTI if Watcom linker is used otherwise double-quote is used
2023-01-24 22:12:28 +01:00
Brad King 7db4df2e8c Tests: Match configure log try_compile directories more precisely
Do not accept a double-quote in the `try_compile` work directory to
ensure we do not match more than the field value.
2023-01-24 15:25:10 -05:00
Jiri Malak 10623a51a0 OpenWatcom: Refactor population of standard include directories
Add setup of system include directories to language related macro to remove extra lines for C and CXX.
System include directories are always same for both languages (they are defined per platform).
2023-01-24 20:44:11 +01:00
scivision a1dc38a567 Help: Document behavior of if(EXISTS,IS_DIRECTORY) for empty paths
Document and add explicit tests for empty string input:
`if(EXISTS "")` and `if(IS_DIRECTORY "")` are always false.
This avoids need for users to do extra checks due to
CMake non-short-circuit logic as below:

    if("${p}")
      if(EXISTS "${p}")
2023-01-24 14:13:52 -05:00
Brad King 62483b9b99 Merge topic 'gen-pkg-example'
bfa61ccf64 Help: Modernize PackageConfigHelpers example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8111
2023-01-24 09:20:49 -05:00
Brad King 7c241bccc3 Merge topic 'wrap-ninja-multi'
d59ab71779 Help: Wrap long examples in Ninja Multi-Config doc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8103
2023-01-24 09:20:14 -05:00
Brad King 8540fe31d1 Merge branch 'release-3.25' 2023-01-24 09:19:16 -05:00
Brad King caf5aea63f Merge topic 'FindPython-CMP0007-NEW'
486b3c0850 FindPython: Policy CMP0007 must be set to NEW

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8104
2023-01-24 09:19:16 -05:00
Brad King 4db877ce9a Merge topic 'FindPython-CMP0007-NEW' into release-3.25
486b3c0850 FindPython: Policy CMP0007 must be set to NEW

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8104
2023-01-24 09:19:14 -05:00
Brad King ba5d255b1c Merge branch 'release-3.25' 2023-01-24 09:18:20 -05:00
Brad King 07206384ec Merge topic 'cxxmodules-ninja-1.11'
8d4e510a44 Merge branch 'backport-cxxmodules-ninja-1.11' into cxxmodules-ninja-1.11
7abddcab08 Ninja: require Ninja 1.11 for C++ module support
0512428ad9 Ninja: require Ninja 1.11 for C++ module support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8099
2023-01-24 09:18:20 -05:00
Brad King 3563d461dd Merge topic 'cxxmodules-ninja-1.11' into release-3.25
0512428ad9 Ninja: require Ninja 1.11 for C++ module support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8099
2023-01-24 09:18:19 -05:00
Kitware Robot ec381070fa CMake Nightly Date Stamp 2023-01-24 00:01:13 -05:00
FeRD (Frank Dana) bfa61ccf64 Help: Modernize PackageConfigHelpers example
The example shown in the module documentation for
CMakePackageConfigHelpers was showing its age, by:

1. Hardcoding directory prefixes (`etc/`, `lib/`, etc.) instead of
   using GNUInstallDirs
2. Handwaving `set()` commands (incorrectly!) as:
     `set(VAR dir/ ... CACHE )`
   which should, at the very least, be:
     `set(VAR dir/ CACHE ... )`
3. Installing CMake configuration files to `lib/Foo/cmake/`, when
   current practice favors `${CMAKE_INSTALL_LIBDIR}/cmake/Foo/`

This updated example addresses all of those issues.
2023-01-23 18:02:31 -05:00
Andrey Alekseenko 6e53d74147 FindOpenMP: Use OpenMP_<lang>_INCLUDE_DIR
If `OpenMP_<lang>_INCLUDE_DIR` is defined, add it to the list of include
directories before checking flags. Previously, this variable was
ignored for all compilers but AppleClang, despite the documentation
mentioning it as one of the possible inputs.

Fixes: #24260
2023-01-23 19:37:26 +01:00
Brad King 8d4e510a44 Merge branch 'backport-cxxmodules-ninja-1.11' into cxxmodules-ninja-1.11 2023-01-23 12:23:18 -05:00
Ben Boeckel 7abddcab08 Ninja: require Ninja 1.11 for C++ module support
See: https://gitlab.kitware.com/cmake/cmake/-/issues/18355#note_1296721
See: https://github.com/ninja-build/ninja/pull/1937
2023-01-23 12:21:05 -05:00
Ben Boeckel 0512428ad9 Ninja: require Ninja 1.11 for C++ module support
See: https://gitlab.kitware.com/cmake/cmake/-/issues/18355#note_1296721
See: https://github.com/ninja-build/ninja/pull/1937
2023-01-23 10:54:53 -05:00
Brad King f9f34eb111 Merge topic 'improve_supported_language_docs'
b787be2714 Help: Update supported languages in project and enable_language

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8101
2023-01-23 10:41:41 -05:00
Brad King 709bc0368f Merge topic 'genex-CONFIG-validate-all'
910ada1a88 Genex: $<CONFIG:> syntax of all entries checked
42e417ad12 GeneratorExpression Tests: Remove duplicate test entry

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8082
2023-01-23 10:40:53 -05:00
Brad King c9fc146a93 Merge topic 'find_cudatoolkit_add_nvrtc_static'
2a94c762ed FindCUDAToolkit: Add support for CUDA::nvrtc_static

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8100
2023-01-23 10:40:05 -05:00
Brad King 99bd5eb062 Merge topic 'vs-BuildInParallel'
33c15ae2b9 VS: Build custom commands concurrently when possible

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8093
2023-01-23 10:39:09 -05:00
Ivan Zinkevich 33c15ae2b9 VS: Build custom commands concurrently when possible
Enable the `BuildInParallel` setting in VS project files when supported.

Fixes: #18405
2023-01-23 10:38:07 -05:00
Brad King f45ef98a7e Merge branch 'release-3.25' 2023-01-23 10:35:52 -05:00
Brad King f07fdb250c Merge topic 'FindOpenSP-pkg-config-hints'
3b1c19f00a FindOpenSP: Use pkg-config only as hints for main code path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8097
2023-01-23 10:35:52 -05:00
Brad King b179982001 Merge topic 'FindOpenSP-pkg-config-hints' into release-3.25
3b1c19f00a FindOpenSP: Use pkg-config only as hints for main code path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8097
2023-01-23 10:35:50 -05:00
Brad King f4d604f77f Merge topic 'try_compile-verbose'
faa950a155 try_compile: Run native build tool with verbose output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8095
2023-01-23 10:34:37 -05:00
Kitware Robot adac7f3ca4 CMake Nightly Date Stamp 2023-01-23 00:01:17 -05:00
Kitware Robot 6d57bbdc7b CMake Nightly Date Stamp 2023-01-22 00:01:08 -05:00
Evan Wilde 1730d208b5 Add incremental Swift static lib build test
Ensure that we're actually trying to rebuild libB when the public
interface for libA changes. Without handling the swiftmodule dependency
edge correctly, we would only get a linker error because libA didn't
have the symbol that libB depended on. With the fix, we get a proper
compiler error because ninja knows to rebuild the intermediate libB
when the public interface of libA changes. This is more actionable.
2023-01-21 10:37:09 -08:00