summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'findwxwidgets-mingw-regression' into release-3.24Brad King2022-07-071-20/+13
|\ | | | | | | | | | | | | | | 7d6e01801d FindwxWidgets: Do not reset wxWidgets_LIB_DIR unnecessarily 6dce42b171 FindwxWidgets: Restore win32 find style on MinGW Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7451
| * FindwxWidgets: Do not reset wxWidgets_LIB_DIR unnecessarilyMaarten Bent2022-07-061-2/+4
| | | | | | | | | | | | Only reset it when `WX_ROOT_DIR` had a value. This change allows to set both `wxWidgets_LIB_DIR` and `wxWidgets_ROOT_DIR` at the same time when they where previously `-NOTFOUND`.
| * FindwxWidgets: Restore win32 find style on MinGWMaarten Bent2022-07-061-18/+9
| | | | | | | | | | | | | | | | | | | | Since commit 6fac8af9ca (FindwxWidgets: set wxWidgets_FIND_STYLE to unix on MINGW, 2022-04-11, v3.24.0-rc1~296^2), we only tried unix find style on MinGW. However, only some MinGW builds have the `wx-config` needed for unix find style. Other builds, including those using the official wxWidgets makefiles, do not provide `wx-config` and need to use win32 find style. To accommodate both use cases, first use win32 find style and if it fails, use unix find style.
* | Merge topic 'FindLAPACK-nvhpc' into release-3.24Brad King2022-07-071-2/+7
|\ \ | |/ |/| | | | | | | | | 28d52a43fc FindLAPACK: Add '-fortranlibs' flag only with NVHPC/PGI compilers Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7452
| * FindLAPACK: Add '-fortranlibs' flag only with NVHPC/PGI compilersEisuke Kawashima2022-07-061-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 2c9e623e31 (Find{BLAS,LAPACK}: Add support for the NVHPC LAPACK library, 2021-05-05, v3.21.0-rc1~192^2) we try the `-fortranlibs` option as a dependency of the NVHPC LAPACK. That flag is specific to the NVHPC/PGI compilers, so use it conditionally with them. Without this modification, CMake fails to find LAPACK if - compiler ID is GNU - `BLA_STATIC` is `ON` - `BLA_VENDOR` is not defined or set to `All` Fixes: #23705, #22878
* | FindwxWidgets: Support more wxWidgets versions, including 3.2Maarten Bent2022-07-051-40/+18
| | | | | | | | | | | | Update the example to use a more recent wxWidgets version. Use a list with known version numbers when searching for installation directories and wx-config names.
* | FindwxWidgets: Use version number from header for library namesMaarten Bent2022-07-051-35/+12
| |
* | FindwxWidgets: Move extracting version number to a macroMaarten Bent2022-07-051-20/+24
| |
* | Merge topic 'nvhpc-Werror' into release-3.24Brad King2022-07-051-1/+1
|\ \ | | | | | | | | | | | | | | | | | | 35ec676ace NVHPC: warnings as error flag is "-Werror" Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7415
| * | NVHPC: warnings as error flag is "-Werror"Robert Maynard2022-07-011-1/+1
| | |
* | | Merge topic 'add_nvcc_compile_warning_support' into release-3.24Brad King2022-07-051-0/+5
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | 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-0/+5
| | |
* | | Genex LINK_LIBRARY: MacOS: enhance *_LIBRARY featuresMarc Chevrier2022-07-031-3/+3
| | |
* | | Darwin.cmake: Fix indentingCraig Scott2022-07-031-3/+3
| | |
* | | FetchContent: Don't use if(... IN_LIST ...)Craig Scott2022-06-281-2/+8
| | | | | | | | | | | | This avoids the need for changing policy settings, which would then propagate through to projects brought into the build via FetchContent.
* | | Merge topic 'FindPython-multiple-queries' into release-3.24Brad King2022-06-281-2/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | ece3bedbf2 FindPython: fix error on multiple queries with different COMPONENTS Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7410
| * | | FindPython: fix error on multiple queries with different COMPONENTSMarc Chevrier2022-06-271-2/+4
| |/ / | | | | | | | | | | | | Ensure that multiple queries with different COMPONENTS specified in different sub-directories are fully supported.
* | | Merge topic 'revert-FindHDF5-library' into release-3.24Brad King2022-06-281-4/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | b5bc72574e FindHDF5: Revert "Add explicit library location instead of guessed ..." Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7416
| * | | FindHDF5: Revert "Add explicit library location instead of guessed ..."Brad King2022-06-271-4/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit e4e309f165 (FindHDF5: Add explicit library location instead of guessed library name., 2022-03-22, v3.24.0-rc1~375^2). The old behavior was not a guessed library name, but the name of an imported target that can contain per-config locations and encode usage requirements. Although find modules do not normally return their imported target names in the `_LIBRARIES` variable, FindHDF5 has done so since commit 5201a3065b (FindHDF5: use the target rather than the path, 2017-01-04, v3.8.0-rc1~81^2). Fixes: #23667
* | | Merge topic 'lcc-liblfortran-renamed' into release-3.24Brad King2022-06-281-1/+5
|\ \ \ | |/ / |/| | | | | | | | | | | | | | 57da7a4925 LCC: link with -lgfortran instead of -llfortran since 1.26.03 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7407
| * | LCC: link with -lgfortran instead of -llfortran since 1.26.03Igor Molchanov2022-06-271-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since LCC 1.26.03, compiler developers decided to rename liblfortran to libgfortran (internal reference: mcstbug#131633), and despite it's stated that "-llfortran will be automatically treated as -lgfortran", it actually does not work (and there's even no symlinks like liblfortran.* -> libgfortran.*); so we have to explicitly choose which library we have to link in. Fixes: #23646
| * | ExternalProject: Fix regression in stamp creation for Xcode+iOSBrad King2022-06-212-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change to `_ep_add_mkdir_command` in commit 5fbac2bb24 (ExternalProject: Move inline scripts to separate files, 2022-01-22, v3.23.0-rc1~101^2) did not account for the possibility that `CMAKE_CFG_INTDIR` is `$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)` instead of just the configuration name. Pass the value into the helper script on the command line so that the native buildsystem placeholders are evaluated. Fixes: #23645
| * | Merge branch 'xcode-14' into release-3.23Brad King2022-06-112-1/+4
| |\ \ | | |/ | | | | | | Merge-request: !7350
* | | Merge topic 'ipo_append_auto_on_gcc' into release-3.24Brad King2022-06-231-1/+12
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | fe57410b33 IPO: Use -flto=auto if compiler is GCC >= 10.1 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7400
| * | | IPO: Use -flto=auto if compiler is GCC >= 10.1Linus Dierheimer2022-06-221-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since GCC 12.1, the `-flto` option warns unless given an explicit LTRANS job count. Issue: #23640
* | | | FindPkgConfig: Revert "Populate _STATIC_LINK_LIBRARIES. Add STATIC_TARGET."Brad King2022-06-221-92/+44
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit 020976d637 (FindPkgConfig: Populate _STATIC_LINK_LIBRARIES. Add STATIC_TARGET., 2021-12-31, v3.24.0-rc1~105^2). Several regressions have been reported. Revert the feature pending further discussion and design work. Issue: #21714 Fixes: #23642
* | | Merge topic 'FetchContent-doc-example' into release-3.24Brad King2022-06-221-3/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 641d97e03f FetchContent: Fix example code in documentation Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Craig Scott <craig.scott@crascit.com> Merge-request: !7393
| * | | FetchContent: Fix example code in documentationpigeon2022-06-211-3/+3
| | | |
* | | | Merge topic 'FindMPI-l-colon' into release-3.24Brad King2022-06-221-8/+13
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a606609499 FindMPI: Parse '-l:' flags in pkg-config output Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7392
| * | | | FindMPI: Parse '-l:' flags in pkg-config outputMarkus Mützel2022-06-211-8/+13
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the msmpi package in MSYS2: $ pkg-config --libs msmpi -LC:/msys64/mingw64/lib -l:libmsmpi.dll.a MSYS2-Issue: https://github.com/msys2/MINGW-packages/pull/11839 Fixes: #23620
* | | | Merge topic 'xcode14' into release-3.24Brad King2022-06-221-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7c79fde5fb Xcode: automatically create Info.plist for signing during compiler id 116cc5a57b cm_cxx_features: filter out warnings from Xcode 14 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7391
| * | | | Xcode: automatically create Info.plist for signing during compiler idGregor Jasny2022-06-211-0/+1
| |/ / / | | | | | | | | | | | | | | | | Extend the Xcode 14 update from commit 89e1113e0c (Xcode: Use ad-hoc signing during compiler id on macOS, 2022-06-10, v3.24.0-rc1~13^2~2).
* | | | ExternalProject: Fix regression in stamp creation for Xcode+iOSBrad King2022-06-212-1/+6
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change to `_ep_add_mkdir_command` in commit 5fbac2bb24 (ExternalProject: Move inline scripts to separate files, 2022-01-22, v3.23.0-rc1~101^2) did not account for the possibility that `CMAKE_CFG_INTDIR` is `$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)` instead of just the configuration name. Pass the value into the helper script on the command line so that the native buildsystem placeholders are evaluated. Fixes: #23645
* | | Merge topic 'fetchcontent-global-targets' into release-3.24Brad King2022-06-111-2/+24
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f19b48e0b8 FetchContent: Honor CMAKE_FIND_PACKAGE_TARGETS_GLOBAL 1305bade56 Help: Add missing version directive for find_package() GLOBAL keyword Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7347
| * | | FetchContent: Honor CMAKE_FIND_PACKAGE_TARGETS_GLOBALCraig Scott2022-06-101-2/+24
| | | | | | | | | | | | Fixes: #23606
* | | | Merge topic 'xcode-14' into release-3.24Brad King2022-06-112-1/+4
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | 627c08e28b Tests: Teach RunCMake to ignore Xcode DVTSDK warnings ab40020b17 Xcode: Suppress "Run Script" build phase warning during compiler id 89e1113e0c Xcode: Use ad-hoc signing during compiler id on macOS Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7350
| * | | Xcode: Suppress "Run Script" build phase warning during compiler idBrad King2022-06-101-0/+1
| | | | | | | | | | | | | | | | | | | | warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs.
| * | | Xcode: Use ad-hoc signing during compiler id on macOSBrad King2022-06-102-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xcode 14 no longer accepts an empty signing identity for macOS. However, Xcode in general does not accept an ad-hoc signing identity for iOS. Switch based on the target platform. Fixes: #23609
* | | | Merge topic 'ExternalProject-stamp-genex' into release-3.24Brad King2022-06-101-15/+22
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c111d440ce ExternalProject: Express per-config step stamp file paths using CONFIG genex Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7341
| * | | | ExternalProject: Express per-config step stamp file paths using CONFIG genexBrad King2022-06-081-15/+22
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ExternalProject module has long used the generator-specific placeholder in the `${CMAKE_CFG_INTDIR}` variable to express per-config stamp file paths in multi-config generators. Now that most generators support generator expressions in custom command outputs, we can use the `$<CONFIG>` genex instead. In particular, this fixes cross-config `BUILD_BYPRODUCTS` with the Ninja Multi-Config generator. Fixes: #23595
* | | | CheckIPOSupported: Compile check using flags of calling projectBrad King2022-06-101-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Forward `CMAKE_<LANG>_FLAGS` and `CMAKE_<LANG>_FLAGS_DEBUG` from the calling project into the test project. The set of flags may affect the availability of IPO support. Since this may change the result of the check for existing projects, add a policy for compatibility. This was discovered after commit 5fcadc481e (MSVC: Default to -ZI instead of /Zi for x86 and x64, 2022-05-24) introduced policy CMP0138 to switch our default for MSVC's debug info flag. The `-ZI` flag is incompatible with the `-GL` flag used for IPO, so CMP0138 was reverted pending future work on an alternative solution. Re-use the CMP0138 policy number for this change to CheckIPOSupported instead. Fixes: #23607
* | | | MSVC: Revert "Default to -ZI instead of /Zi for x86 and x64"Brad King2022-06-093-25/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 'doc-using-deps-guide' into release-3.24Brad King2022-06-091-1/+7
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | 92e93f5c9e Help: Overhaul and expand the Using Dependencies Guide Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Alex <leha-bot@yandex.ru> Merge-request: !7332
| * | | Help: Overhaul and expand the Using Dependencies GuideCraig Scott2022-06-091-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The guide previously only focused on the find_package() command, with a bias towards libraries. FetchContent was not mentioned at all. Reorganise and update the existing content. Add new sections to cover providing dependencies with FetchContent and dependency providers. Improve discoverability of the guide by mentioning it at the beginning of the find_package(), FetchContent and dependency provider docs.
* | | | Merge topic 'print-sources'Brad King2022-06-071-27/+48
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | cmake_print_properties(): Update grammar docsFeRD (Frank Dana)2022-06-061-6/+6
| | | | |
| * | | | PrintHelpers: Document argument order restrictionFeRD (Frank Dana)2022-06-061-1/+4
| | | | |
| * | | | PrintHelpers: Fix indentationFeRD (Frank Dana)2022-06-061-2/+2
| | | | |
| * | | | PrintHelpers: Rewrite a few more error messagesFeRD (Frank Dana)2022-06-061-2/+3
| | | | |
| * | | | PrintHelpers: Fix target SOURCES propertyFeRD (Frank Dana)2022-06-061-16/+33
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's been a long-standing bug in CMakePrintHelpers that the cmake_print_properties() function cannot print the SOURCES property of a requested TARGET, confusing it with a request to print properties of SOURCES. We work around this by parsing the arguments in two stages, so that a SOURCES that comes after the PROPERTIES keyword is handled differently from a SOURCES that comes before it. This adds the restriction that the "mode" keyword (TARGETS SOURCES DIRECTORIES etc...) and its arguments **must** precede the PROPERTIES keyword and its arguments. In other words: 1. Both of these are now valid and will be interpreted correctly, whereas previously only the first was, and the second caused a FATAL_ERROR: cmake_print_properties(SOURCES foo.c PROPERTIES LANGUAGE) cmake_print_properties(TARGETS foo PROPERTIES SOURCES) 2. This, OTOH, which used to be valid, no longer is, and will trigger a FATAL_ERROR: cmake_print_properties(PROPERTIES LANGUAGE SOURCES foo.c) Fixes: #14883