Commit Graph

31585 Commits

Author SHA1 Message Date
Seth R Johnson
8f7e98ef09 cmInstallTargetGenerator: optimize rpath adjustments
With builds that have many internal library directories or many
external libraries, rpaths can be quite large. The cost of calling
install_name_tool thousands of times can add up to minutes on a build,
especially if virus scanning software is there to help you out. With
this change, instead of deleting and then re-adding an rpath, we ignore
it.  Likewise we batch all the rpath adjustment calls into a single command.

Before, installing SCALE (some libraries have 70+ build-time RPATHs that
get deleted, plus up to a dozen external RPATHs from upstream
dependencies that should remain in the binary) would take almost 9
minutes on my laptop, and after this change the installation takes only
30 second.
2021-09-30 15:36:35 -04:00
Kitware Robot
32818510c8 CMake Nightly Date Stamp 2021-09-30 00:01:14 -04:00
Raul Tambre
4a0485be7f cmStandardLevelResolver: Avoid unnecessary flags, fix unset level logic
The changes are part of CMP0128.

When the standard level is unset:
* Flags are added if extension mode doesn't match the compiler's default.
  Previously logic only worked if LANG_EXTENSIONS was ON. Fixes #22224.
* The full flag is used. Previously CMAKE_LANG_EXTENSION_COMPILE_OPTION was
  used. This was only supported for IAR.

Otherwise:
* Avoid adding flags if not necessary per the detected compiler defaults.
* Fixed check for when the requested standard is older. It now matches the
  nearby comments.

I reworded the fallback comment as its logic was a bit difficult to wrap my
head around.
2021-09-29 22:28:40 +03:00
Brad King
5bd94332c7 Merge topic 'clang-warnings'
37859e3244 Source: Fix clang -Wimplicit-fallthrough warnings
907d098838 Source: Fix clang -Wextra-semi warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6561
2021-09-29 09:57:47 -04:00
Brad King
84673a8243 Merge topic 'xcode-dead-code'
b8a2ce0484 cmGlobalXCodeGenerator: Remove dead buildsystem version check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !6568
2021-09-29 09:57:00 -04:00
Brad King
a074204986 Merge topic 'xcode-generation-support-inl-files'
16ea0e57f7 Xcode: Treat .inl files as C++ header files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6563
2021-09-29 09:56:02 -04:00
Kitware Robot
700f76299c CMake Nightly Date Stamp 2021-09-29 00:01:13 -04:00
Sean McBride
37859e3244 Source: Fix clang -Wimplicit-fallthrough warnings 2021-09-28 10:53:54 -04:00
Jake Turner
16ea0e57f7 Xcode: Treat .inl files as C++ header files
Generate the `explicitFileType` as `sourcecode.cpp.h` instead of just
`sourcecode`.  This enables syntax highlighting in Xcode.
2021-09-28 10:49:04 -04:00
Brad King
b8a2ce0484 cmGlobalXCodeGenerator: Remove dead buildsystem version check
In commit 8d5f4c4db9 (Xcode: Switch to the "new build system" for Xcode
12 and above, 2020-09-14, v3.19.0-rc1~143^2~7) we accidentally added
code in an `else` block that under the opposite condition by which
the block can be entered.  Remove it.

Fixes: #22681
2021-09-28 10:42:48 -04:00
Sean McBride
907d098838 Source: Fix clang -Wextra-semi warnings 2021-09-28 09:59:24 -04:00
Kitware Robot
966d9b3967 CMake Nightly Date Stamp 2021-09-28 00:01:17 -04:00
Brad King
a21d5455c0 Merge topic 'autogen-dep-on-imported-implib-only-target'
895fa3433f cmQtAutoGenInitializer: support IMPLIB-only imported targets
354c1f5628 Tests/RunCMake/Autogen: test CMP0111 behavior

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6558
2021-09-27 13:48:57 -04:00
Kitware Robot
b0c2aeaab4 CMake Nightly Date Stamp 2021-09-27 00:01:25 -04:00
Kitware Robot
1edc9e8887 CMake Nightly Date Stamp 2021-09-26 00:01:28 -04:00
Kitware Robot
c42a5a6d93 CMake Nightly Date Stamp 2021-09-25 00:01:17 -04:00
Ben Boeckel
895fa3433f cmQtAutoGenInitializer: support IMPLIB-only imported targets
Instead of using the target name directly (which ends up in the `Ninja`
generators querying for the `LOCATION` parameter), wrap up the target
name in a `$<TARGET_LINKER_FILE:>` to avoid the query for the unset
property.
2021-09-24 11:29:54 -04:00
Kitware Robot
d2541062bd CMake Nightly Date Stamp 2021-09-24 00:01:17 -04:00
Brad King
e83a5f9cac Merge topic 'vs2008-no-pch-flag'
a2b782bbc1 VS: Map /Y- flag to not use precompiled headers with VS 2008

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6548
2021-09-23 10:33:19 -04:00
Kitware Robot
efed2f8706 CMake Nightly Date Stamp 2021-09-23 00:01:16 -04:00
Luigi Fiorentini
a2b782bbc1 VS: Map /Y- flag to not use precompiled headers with VS 2008 2021-09-22 09:19:47 -04:00
Brad King
286bdad531 Merge topic 'rename-cmProp-in-cmValue'
59ad7a1c24 Move helpers functions from cmStringAlgorithms.h to cmValue.h
edf67dd039 cmValue: add IsInternallyOn methods
cc56dc7468 Rename cmProp in cmValue

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6554
2021-09-22 09:10:39 -04:00
Kitware Robot
60caed1bd6 CMake Nightly Date Stamp 2021-09-22 00:02:18 -04:00
Marc Chevrier
59ad7a1c24 Move helpers functions from cmStringAlgorithms.h to cmValue.h
Helpers functions related to cmValue semantic are now part of
cmValue.h header.
2021-09-21 18:11:00 +02:00
Marc Chevrier
edf67dd039 cmValue: add IsInternallyOn methods 2021-09-21 17:14:05 +02:00
Marc Chevrier
cc56dc7468 Rename cmProp in cmValue 2021-09-21 17:14:04 +02:00
Brad King
62834c0760 Merge topic 'macos-cache-rpath-install-namedir'
2266e223c5 macOS: Speed up rpath install name dir lookup with a cache

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6543
2021-09-21 11:06:25 -04:00
Brad King
b0b689d566 Merge topic 'cat_empty_file'
0b4a56e64b cmake: -E cat stops when an empty file is encountered

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6539
2021-09-21 11:05:06 -04:00
Brad King
af37066d35 Merge topic 'refactor-remove-cmToCStr-function'
3a1e6f5f59 remove cmToCStr function
dffa3f485c cmGlobalGenerator::PrintCompilerAdvice: use cmProp as augment
062432a6bc cmCurlSetCAInfo: use std::string as argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6544
2021-09-21 11:03:19 -04:00
Brad King
4aeaf72fd6 Merge topic 'clang-manifest'
b73857561f Clang: embed windows manifests with GNU interface

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6534
2021-09-21 11:02:23 -04:00
Brad King
bcdd8cfe44 Merge topic 'platform-vars'
a136b6ec98 MINGW: Define variable only when targeting Windows platforms
39c5dad0cb Ninja: Remove redundant check for GNU-like compiler on Windows
0b7ae84a96 Cygwin: Remove redundant definitions of CYGWIN and UNIX variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6538
2021-09-21 11:01:18 -04:00
Kitware Robot
6261210a67 CMake Nightly Date Stamp 2021-09-21 00:01:14 -04:00
Brad King
7612abd52f CMake 3.21.3 2021-09-20 12:43:52 -04:00
Lukas Böger
2266e223c5 macOS: Speed up rpath install name dir lookup with a cache
Fixes: #20602
2021-09-20 11:15:25 -04:00
Kitware Robot
ed0139e606 CMake Nightly Date Stamp 2021-09-20 00:02:28 -04:00
Marc Chevrier
3a1e6f5f59 remove cmToCStr function 2021-09-19 19:11:07 +02:00
Marc Chevrier
dffa3f485c cmGlobalGenerator::PrintCompilerAdvice: use cmProp as augment 2021-09-19 19:11:07 +02:00
Marc Chevrier
062432a6bc cmCurlSetCAInfo: use std::string as argument 2021-09-19 19:10:59 +02:00
Kitware Robot
96c3849384 CMake Nightly Date Stamp 2021-09-19 00:01:37 -04:00
Johnny Jazeix
0b4a56e64b cmake: -E cat stops when an empty file is encountered
Fixes: #22652
2021-09-18 18:54:53 +02:00
Marc Chevrier
e4ad87c5dd Merge topic 'VersionCompare-use-std_string'
7e154ebd59 cmSystemTools::VersionCompare: use std::string for arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6535
2021-09-18 11:06:15 -04:00
Kitware Robot
4c54b26623 CMake Nightly Date Stamp 2021-09-18 00:01:14 -04:00
Brad King
39c5dad0cb Ninja: Remove redundant check for GNU-like compiler on Windows
Update the Ninja generator's check to work using whatever language is
being enabled instead of hard-coding C and CXX.  With that, the
undocumented internal `CMAKE_COMPILER_IS_MINGW` variable is only set by
compilers already covered by other alternatives in the condition.  See
commit b3de0dfe93 (Ninja: Use forward slashes for any GCC on Windows,
2015-05-07, v3.3.0-rc1~93^2~3).
2021-09-17 12:15:11 -04:00
Marc Chevrier
7e154ebd59 cmSystemTools::VersionCompare: use std::string for arguments 2021-09-17 11:58:46 +02:00
Kitware Robot
241048d6ce CMake Nightly Date Stamp 2021-09-17 00:01:19 -04:00
Thomas Bernard
b73857561f Clang: embed windows manifests with GNU interface
Solves: #22611
2021-09-17 00:35:32 +02:00
Craig Scott
0d2719d311 Merge topic 'xcode-embed-libraries'
6ef7bfbb64 Xcode: add support for embedding dynamic libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6490
2021-09-16 17:46:09 -04:00
Brad King
f5445e321e Merge topic 'enh-CPack-SetOption-accepts-new-types'
7fce78982b Use new SetOption signatures
7aeb262278 cmCPackGenerator::SetOption accepts cmProp or std::string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6526
2021-09-16 08:22:06 -04:00
Brad King
9858381ba8 Merge topic 'enh-CTest-SetOption-accepts-new-types'
8f52451682 Use new SetOption signatures
8d0ae460de cmCTestGenericHandler::SetOption accepts cmProp or std::string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6525
2021-09-16 08:20:30 -04:00
Brad King
98f78af88b Merge topic 'update-curl'
412189bce7 curl: Set build options the way we need for CMake
8ecd95845c Merge branch 'upstream-curl' into update-curl
386467c9dc curl 2021-09-14 (8e82f2a0)
a8ae9c7055 curl: Update script to get curl 7.79.0
3cfd89add5 cmCurl: Fix file:// URLs with spaces for curl 7.78+
63b5a6869e cmCurl: Adopt helper to fix file:// URLs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6523
2021-09-16 08:19:37 -04:00