Commit Graph

2175 Commits

Author SHA1 Message Date
Brad King
ea67dbc4cd Merge topic 'file_generate_target'
27a912193b file(GENERATE): Add TARGET argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5131
2020-08-25 10:31:02 -04:00
Brad King
0b0dc86eab Merge topic 'unk_imported_location'
359c500a24 cmTarget: Raise error if imported target location is not set

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5113
2020-08-25 10:30:14 -04:00
Brad King
4294526504 Merge topic 'msvc_static_assert'
95bc11dbb4 MSVC: Record support for c_static_assert

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5148
2020-08-25 10:26:54 -04:00
Raul Tambre
359c500a24 cmTarget: Raise error if imported target location is not set
Previously we would synthesize <TARGET_NAME>-NOTFOUND as the location. This
would then end up on the link line and cause build failures.
Policy CMP0110 is added to control this behaviour.

Fixes #19080, #19943.
2020-08-21 08:38:39 -04:00
Raul Tambre
27a912193b file(GENERATE): Add TARGET argument
Adds TARGET argument to file(GENERATE) to make resolving generator expressions
requiring a target possible.

Implements #21101, fixes #21074.
2020-08-20 17:41:52 +03:00
Raul Tambre
95bc11dbb4 MSVC: Record support for c_static_assert
Supported since MSVC 19.28.29115 (VS 16.8.0 Preview 1.0).
2020-08-20 09:45:47 -04:00
Brad King
cb5c8e6f25 Merge topic 'cpack-wix-custom-xmlns'
267de3ba30 CPack/WiX: Add support for custom XML namespaces

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5132
2020-08-19 11:48:24 -04:00
Fritz Elfert
267de3ba30 CPack/WiX: Add support for custom XML namespaces
Add a `CPACK_WIX_CUSTOM_XMLNS` option to specify these.

Fixes: #21098
2020-08-18 07:50:49 -04:00
Brad King
fe3a404a73 Merge topic 'add_test-special-chars-in-name'
a20987732b add_test: Allow special characters in test name (w/ policy CMP0110)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5076
2020-08-17 14:58:49 -04:00
Kyle Edwards
8b5aa9051b Merge topic 'optimize-static-library-deps'
2e42651dff Add option to optimize link dependencies for static libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5103
2020-08-13 14:16:25 -04:00
Kyle Edwards
2e42651dff Add option to optimize link dependencies for static libraries
Add an `OPTIMIZE_DEPENDENCIES` target property and supporting
`CMAKE_OPTIMIZE_DEPENDENCIES` variable to optionally enable pruning and
flattening of outgoing dependencies from static libraries.  Since they
do not actually link, they only depend on side effects of their
dependencies.  Therefore we can drop dependencies that contribute no
side effects.
2020-08-12 11:31:07 -04:00
Brad King
b3196fe864 Merge topic 'msvc_c11'
f7347f28c7 MSVC: Record support for C11 and c_restrict

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5115
2020-08-12 11:14:52 -04:00
Deniz Bahadir
a20987732b add_test: Allow special characters in test name (w/ policy CMP0110)
Restore the change from commit f84af8e270 (add_test: Allow special
characters in test name, 2020-05-16, v3.18.0-rc1~142^2) that had to be
reverted by commit f84af8e270 (add_test: Allow special characters in
test name, 2020-05-16, v3.18.0-rc1~142^2) for compatibility.

Add policy CMP0110 to make the change in a compatible way.
Also, support even more characters than before by generating the
test scripts using bracket arguments around the test names.

Fixes: #19391
Signed-off-by: Deniz Bahadir <dbahadir@benocs.com>
2020-08-12 10:44:07 -04:00
Raul Tambre
f7347f28c7 MSVC: Record support for C11 and c_restrict
MSVC >=19.27 supports a C11 switch.
The `c_restrict` feature has also been implemented.

Fixes: #21069
2020-08-11 09:08:21 -04:00
Brad King
121c3717ee Merge topic 'automoc-path-prefix-off'
5b5be34811 Help: Add 3.18.2 release note about AUTOMOC_PATH_PREFIX default change
db659e18bc Merge branch 'backport-3.17-automoc-path-prefix-off'
e503fbe38a Merge branch 'backport-3.16-automoc-path-prefix-off'
4c33b305a0 Autogen: Turn off moc path prefix generation by default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5105
2020-08-11 08:51:02 -04:00
Brad King
d6ee9b4a43 Merge topic 'build-interface-targets'
bafa9fe887 fileapi: Add INTERFACE libraries with SOURCES to codemodel-v2
4391913133 Add INTERFACE libraries to generated buildsystem if they have SOURCES
afb998704e Remove filtering of allowed INTERFACE library properties
e7edba2baf Makefiles: Use IsInBuildSystem in global generator target type checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5078
2020-08-10 11:38:59 -04:00
Brad King
0953c0051e Merge topic 'clang-cl-vfs'
20ebaed972 Clang: Add support for passing VFS arguments
d993ebd4ca clang-cl: Add '--' before source file
a94672b919 cmake: Change cmake_llvm_rc separator from -- to ++ to avoid conflict

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5087
2020-08-10 11:33:19 -04:00
Joerg Bornemann
5b5be34811 Help: Add 3.18.2 release note about AUTOMOC_PATH_PREFIX default change 2020-08-10 10:49:55 -04:00
Thomas Bernard
20ebaed972 Clang: Add support for passing VFS arguments 2020-08-07 11:52:45 -04:00
Brad King
304f159af4 Merge topic 'CUDAToolkit-no-nvcc'
7cc815a2a6 CUDAToolkit: Detect CUDA SDK that don't have nvcc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: Raul Tambre <raul@tambre.ee>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !5061
2020-08-07 11:04:54 -04:00
Brad King
4391913133 Add INTERFACE libraries to generated buildsystem if they have SOURCES
INTERFACE libraries were created with the intention of collecting usage
requirements for use by other targets via `target_link_libraries`.
Therefore they were not allowed to have SOURCES and were not included in
the generated buildsystem.  In practice, this has become limiting:

* Header-only libraries do have sources, they just do not compile.
  Developers should be able to edit those sources (the header files)
  in their IDE.

* Header-only libraries may need to generate some of their header
  files via custom commands.

Some projects work around these limitations by pairing each interface
library with an `add_custom_target` that makes the header files and
custom commands appear in the generated buildsystem and in IDEs.

Lift such limitations by allowing INTERFACE libraries to have SOURCES.
For those with sources, add a corresponding build target to the
generated buildsystem.

Fixes: #19145
2020-08-07 08:46:32 -04:00
Brad King
4daf76e10a Merge topic 'compiler_flags'
f76c20da63 Toolchain: Test compiler initial settings
db486da265 Toolchain: Update documentation for initial compiler flags
deec2f587c Toolchain: Take CMAKE_<lang>_FLAGS_INIT into account during compiler detection
ca899af3e2 Toolchain: Handle repeated invocations of CMake with -DCMAKE_C_COMPILER
12ba89e142 Toolchain: Make `/path/comp;-argn' behave the same as 'comp;-argn'
6f1af899db Toolchain: Capture all arguments from CMAKE_<LANG>_COMPILER
ec1d3bc0b6 cmake: avoid exception when printing "changed variables" message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4136
2020-08-06 11:00:12 -04:00
Fred Baksik
db486da265 Toolchain: Update documentation for initial compiler flags 2020-08-03 12:34:46 -04:00
Robert Maynard
7cc815a2a6 CUDAToolkit: Detect CUDA SDK that don't have nvcc
When a CUDA sdk doesn't have nvcc, defer to the existence of
a version.txt file. When we do this fall back we also reconstruct
the CUDA version via version.txt

Fixes #20643
2020-07-30 15:56:52 -04:00
Craig Scott
22bfe014d0 Merge topic 'file-download-no-save'
fed7d8f76d file(DOWNLOAD): Make file argument optional

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5060
2020-07-28 10:23:35 -04:00
Brad King
40d3f5a227 Merge topic 'revert-add_test-special-chars'
5fc5f4d26e add_test: Revert "Allow special characters in test name"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5067
2020-07-28 08:24:34 -04:00
Brad King
5fc5f4d26e add_test: Revert "Allow special characters in test name"
Revert commit f84af8e270 (add_test: Allow special characters in test
name, 2020-05-16, v3.18.0-rc1~142^2).  Unfortunately the fix breaks
projects that were working around the limitation with manual escaping.
The fix can be re-introduced with a policy in a future version.

Also add a 3.18.1 release note explaining the change.

Fixes: #21017, #20965
Issue: #19391
2020-07-28 08:04:11 +10:00
Kyle Edwards
fed7d8f76d file(DOWNLOAD): Make file argument optional 2020-07-27 11:26:50 -04:00
Brad King
11cf196fd2 Merge topic 'EXCLUDE_FROM_ALL-genex'
22bd267388 Help: Add release note for EXCLUDE_FROM_ALL genex support
807c8aa9f0 Tests: Simplify RunCMake.ExcludeFromAll single-config case
36743436cf Tests: Fix RunCMake.ExcludeFromAll test program warning
99c131c5a3 cmGlobalGenerator: Fix spelling of EXCLUDE_FROM_ALL in error message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5049
2020-07-27 10:40:56 -04:00
Brad King
22bd267388 Help: Add release note for EXCLUDE_FROM_ALL genex support 2020-07-23 07:14:48 -04:00
Jean-Christophe Fillion-Robin
207373802e Fix typos identified using codespell
See https://github.com/codespell-project/codespell#readme

The following command was used:

```
codespell -q6 --skip="\
.git,\
*.json,\
./Copyright.txt,\
./Help/command/foreach.rst,\
./Help/prop_test/REQUIRED_FILES.rst,\
./Help/variable/CTEST_COVERAGE_COMMAND.rst,\
./Modules/CMakeCheckCompilerFlagCommonPatterns.cmake,\
./Modules/CMakeRCInformation.cmake,\
./Modules/Internal/CPack/NSIS.template.in,\
./Modules/FindMatlab.cmake,\
./Modules/MatlabTestsRedirect.cmake,\
./Modules/Platform/Windows-Clang.cmake,\
./Modules/Platform/Windows-Intel-Fortran.cmake,\
./Modules/Platform/Windows-MSVC.cmake,\
./Source/CMakeVersion.cmake,\
./Source/cmConvertMSBuildXMLToJSON.py,\
./Source/cmCreateTestSourceList.cxx,\
./Source/cmGlobalVisualStudio10Generator.cxx,\
./Source/cmExportBuildFileGenerator.cxx,\
./Source/cmExportInstallAndroidMKGenerator.cxx,\
./Source/cmExportInstallFileGenerator.cxx,\
./Source/cmExportSet.cxx,\
./Source/cmExportTryCompileFileGenerator.cxx,\
./Source/cmFindPackageCommand.cxx,\
./Source/cmInstallCommand.cxx,\
./Source/cmGeneratorExpressionLexer.cxx,\
./Source/cmLocalVisualStudio7Generator.cxx,\
./Source/cmOrderDirectories.cxx,\
./Source/cmTarget.cxx,\
./Source/kwsys/*,\
./Source/QtDialog/CMakeSetupDialog.ui,\
./Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx,\
./Source/CTest/cmParseCoberturaCoverage.h,\
./Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in,\
./Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt,\
./Tests/RunCMake/GoogleTest/xml_output.cpp,\
./Tests/RunCMake/Make/TargetMessages*,\
./Utilities/*,\
" \
-L "\
dependees,\
endwhile,\
fo,\
filetest,\
helpfull,\
nd,\
objext,\
stoll,\
supercedes,\
superceded,\
vas,\
varn,\
"
```
2020-07-22 12:44:47 -04:00
Craig Scott
8abeec58f3 Merge topic 'xcode-native-arch'
26673bf480 Xcode: Explicitly specify default native architecture on macOS
ce624cfbd4 cmGlobalXCodeGenerator: Save CMAKE_SYSTEM_NAME in member

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5023
2020-07-21 07:19:02 -04:00
Brad King
26673bf480 Xcode: Explicitly specify default native architecture on macOS
When `CMAKE_OSX_ARCHITECTURES` is not specified, we add the Xcode
setting `ONLY_ACTIVE_ARCH = YES` with the intention of targeting the
native architecture of the host.  However, the default `ARCHS` value
chosen by "Xcode 12 Universal Apps" includes multiple architectures.
Add an explicit `ARCHS` setting with value `$(NATIVE_ARCH_ACTUAL)`
to tell Xcode to use the host's native architecture only.

Fixes: #20893
2020-07-20 10:03:15 -04:00
Brad King
c7b7547d8d Merge topic 'cmake-E-create_hardlink'
2fad00940d cmake: Add -E create_hardlink

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5015
2020-07-16 10:19:12 -04:00
Sibi Siddharthan
2fad00940d cmake: Add -E create_hardlink
Fixes: #20950
Signed-off-by: Sibi Siddharthan <sibisiddharthan.github@gmail.com>
2020-07-15 20:22:04 +05:30
Tor Arne Vestbø
17e13fb6d0 macOS: Always pick latest SDK if user has not set one explicitly
Apple tech note QA1806 recommends always building against the latest
SDK.

Fixes: #20949
2020-07-14 15:43:45 +02:00
Brad King
8d268f57b4 Merge topic 'cuda-memcheck'
cee92a9fb0 Help: add release notes for CTest cuda-memcheck support
f38e4a1871 Tests: Add cases for CTest cuda-memcheck parser
fe062800f0 CTest: add cuda-memcheck support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: tcojean <terry.cojean@kit.edu>
Merge-request: !4952
2020-07-13 07:58:38 -04:00
Tobias Ribizel
cee92a9fb0 Help: add release notes for CTest cuda-memcheck support 2020-07-09 19:08:36 +02:00
Craig Scott
8975c2a55b Merge topic 'remove-warn-unused-vars'
df6b077625 cmake: Remove broken '--warn-unused-vars' option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !4953
2020-07-01 07:03:54 -04:00
Brad King
b7af2811ae Merge topic 'configure_file-permission-control'
27b03281e2 configure_file: Add option to control file permissions transfer to copy

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4941
2020-07-01 07:03:03 -04:00
Brad King
57ea001247 Merge topic 'FindTIFF-tiffxx'
a468cc431c FindTIFF: add component CXX to include the C++ wrapper libtiffxx

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4934
2020-07-01 07:02:09 -04:00
Kyle Edwards
b67eb65688 Help: Update FileAPI codemodel version to 2.2, add release notes
This fixes the documentation which should have been fixed in 7d6861f3.
2020-06-30 14:05:23 -04:00
Kyle Edwards
849178c9d0 Merge branch 'master' into fileapi-version-doc 2020-06-30 14:04:25 -04:00
Kyle Edwards
e9be17ab42 Help: Update FileAPI codemodel version to 2.1, add release notes
This fixes the documentation which should have been fixed in 9f6d40ee.
2020-06-30 14:04:13 -04:00
Rahul Gottipati
27b03281e2 configure_file: Add option to control file permissions transfer to copy
Issue: #20866
2020-06-30 11:20:41 -04:00
Brad King
f67a787a38 Merge topic 'find_vulkan_glslc'
467509d767 FindVulkan: Support for finding glslc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4944
2020-06-30 07:27:27 -04:00
Brad King
df6b077625 cmake: Remove broken '--warn-unused-vars' option
This option has been broken since commit b9f9915516 (cmMakefile: Remove
VarUsageStack., 2015-05-17, v3.3.0-rc1~52^2).  That commit removed the
check that an initialized variable has actually been used and caused the
option to warn on every variable ever set.  This was not caught by the
test suite because the test for the feature only checked that warnings
appear when needed and not that they do not appear when not needed.

The option was never very practical to use.  Remove it to avoid the
runtime cost of usage tracking and checks for every variable (which we
were doing even when the option was not used).
2020-06-29 17:23:27 -04:00
Joachim Wuttke (h)
a468cc431c FindTIFF: add component CXX to include the C++ wrapper libtiffxx
Fixes: #20860
2020-06-29 11:55:22 -04:00
Ryan Kawicki
467509d767 FindVulkan: Support for finding glslc
The GLSL SPIR-V compiler is part of the Vulkan SDK and may be used
by projects for compiling shaders as part of the build process.
This is not strictly required to build a Vulkan application, which
is why the variable is not part of the REQUIRED_VARs for the module.
2020-06-26 20:57:06 -05:00
Kyle Edwards
5fc7c14528 Merge topic 'install-default-directory-permissions'
d4812a955b cmake-install: implement default directory permissions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4927
2020-06-26 10:26:57 -04:00