Brad King
f36af9228b
cmLocalGenerator: Evaluate generator expressions in custom command outputs
...
Custom commands with generator expressions in their OUTPUTs or
BYPRODUCTS are still attached to a single `.rule` file. We use an
internal map to look up the source file holding the custom command for a
given output. Populate this map using the outputs and byproducts from
all configurations after evaluating the generator expressions for each
configuration.
Issue: #12877
2020-12-11 08:24:06 -05:00
Brad King
c887cefd9a
cmLocalGenerator: Simplify custom command output cmSourceFile creation
...
Move calls to `CreateGeneratedSource` over to `UpdateOutputToSourceMap`,
which is called for all generated outputs and byproducts.
2020-12-10 07:06:21 -05:00
Brad King
947ba01bf9
cmLocalGenerator: Factor out helper to expand custom command output paths
2020-12-10 07:06:21 -05:00
Brad King
1902d28ebc
cmLocalGenerator: Refactor UpdateOutputToSourceMap to avoid boolean trap
2020-12-10 07:06:20 -05:00
Brad King
e4034eabe9
cmLocalGenerator: Re-order logic in CreateGeneratedSource
...
Return early on errors to reduce nesting.
2020-12-10 07:06:20 -05:00
Brad King
7775cbdb82
Merge topic 'range-for-avoid-tmp-warning'
...
99a26babb1 Cleanup: Fix warning about binding to a temporary in range-based for
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5578
2020-12-08 10:21:33 -05:00
Brad King
60d95fe2c2
Merge topic 'correct_ispc_path_computation'
...
9af93fef11 ISPC: Handle OBJECT sources in different directories
72ae15ebcb ISPC: Ninja properly compute ISPC_HEADER_DIRECTORY location
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5581
2020-12-08 10:17:33 -05:00
Craig Scott
99a26babb1
Cleanup: Fix warning about binding to a temporary in range-based for
2020-12-08 08:32:30 +11:00
Brad King
afd495decd
Merge topic 'asm_arch'
...
fcabf4a47e macOS: Add architecture flags only for native ASM dialect
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5572
2020-12-07 10:28:18 -05:00
Robert Maynard
9af93fef11
ISPC: Handle OBJECT sources in different directories
2020-12-07 09:14:54 -05:00
Raul Tambre
fcabf4a47e
macOS: Add architecture flags only for native ASM dialect
...
ASM dialects like NASM have languages names such as ASM_NASM.
However such ASM dialects don't support the architecture flags, so match only
the full name.
Fixes #21553 .
2020-12-04 17:29:14 +02:00
Brad King
0f00d01717
Merge topic 'pch-ios-multi-arch-nmc'
...
35432aabda PCH: Fix compiler errors on iOS multi-arch using Ninja Multi-Config
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5544
2020-12-01 09:26:58 -05:00
Cristian Adam
35432aabda
PCH: Fix compiler errors on iOS multi-arch using Ninja Multi-Config
...
Fixes : #21401
2020-11-30 13:31:51 -05:00
Deniz Bahadir
7524501d89
PCH: Do not mark PCH-header as generated
...
The PCH header file itself is written by CMake and is not generated by
part of the buildsystem. Therefore the `GENERATED` property is not
appropriate to set because the file is always present before the build
starts. We already do not mark the PCH source file as `GENERATED`
either.
This is a preparation for solving #18399 , which will no longer allow to
unset the `GENERATED` property from a source-file once it was set.
Fixes : #21437
Signed-off-by: Deniz Bahadir <dbahadir@benocs.com>
2020-11-16 12:56:54 -05:00
Vitaly Stakhovsky
f6e7d5f3a0
Reduce the scope of temporary cmProp variables and other improvements
2020-11-05 11:07:39 -05:00
vvs31415
f808f27919
cmLocalGenerator::GetRuleLauncher: return cmProp
2020-11-02 13:07:46 -05:00
Asit Dhal
03ad0e61c1
configure_file: Add option for user defined permissions
...
User defined permissions and options to copy permissions are
implemented.
Fixes : #20866
2020-10-24 12:00:47 +02:00
Cengizhan Pasaoglu
bd705788f6
Constify some code as suggested by clang-tidy
2020-10-20 00:04:04 +03:00
Brad King
0090a11a42
cmLocalGenerator: Migrate custom command output lookup from cmMakefile
...
Since commit 777ceaea94 (cmMakefile: Delay custom command creation,
2019-10-17, v3.17.0-rc1~352^2) we process custom command declarations at
generate time. Therefore we do not need to look up what source file
holds the custom command producing a given output until generate time.
2020-10-08 12:20:33 -04:00
Brad King
26464da5d3
cmMakefile: Drop unnecessary custom command APPEND check
...
Since commit 777ceaea94 (cmMakefile: Delay custom command creation,
2019-10-17, v3.17.0-rc1~352^2) we process custom command declarations
at generate time. This includes the append-to-non-existing-command
check, so we do not need it at configure time.
2020-10-08 12:20:33 -04:00
Raul Tambre
c63fe01835
CUDA: Clang separable compilation
...
For NVCC the compiler takes care of device linking when passed the "-dlink"
flag.
Clang doesn't support such magic and requires the buildsystem to do the work
that NVCC does behind the scenes.
The implementation is based on Bazel's device linking documentation:
7cabcdf073/third_party/nccl/build_defs.bzl.tpl (L259)
Closes : #20726
2020-09-24 15:19:54 -04:00
Brad King
7710c94009
Merge topic 'pch-tv90'
...
ce7c100545 PCH: Fix 30s wait for VS2008 when used via -Tv90
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5199
2020-09-09 11:24:34 -04:00
Cristian Adam
ce7c100545
PCH: Fix 30s wait for VS2008 when used via -Tv90
...
Fixes : #21142
Backport: release
2020-09-07 19:49:15 +02:00
Robert Maynard
a020787a9b
ISPC: Support generation for multiple instruction sets
2020-09-04 08:37:07 -04:00
Vitaly Stakhovsky
11425041f0
cmMakefile::GetDefinition: return cmProp
2020-09-02 07:27:32 -04:00
Brad King
f10682b796
Merge topic 'ispc_lang_support'
...
5ece12b7e4 gitlab-ci: add ISPC to the Fedora CI image
8976817d6d ISPC: Update help documentation to include ISPC
2368f46ba4 ISPC: Support building with the MSVC toolchain
e783bf8aa6 ISPC: Support ISPC header generation byproducts and parallel builds
34cc6acc81 Add ISPC compiler support to CMake
419d70d490 Refactor some swift only logic to be re-used by other languages
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5065
2020-09-01 09:15:39 -04:00
Robert Maynard
e783bf8aa6
ISPC: Support ISPC header generation byproducts and parallel builds
2020-08-28 11:21:31 -04:00
Brad King
5e212cafba
Merge topic 'osx_asm_architectures'
...
940fc62962 macOS: Respect OSX_ARCHITECTURES for ASM
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5152
2020-08-25 10:40:20 -04:00
Raul Tambre
940fc62962
macOS: Respect OSX_ARCHITECTURES for ASM
...
Fixes #20771 .
2020-08-22 09:16:21 +03:00
Kyle Edwards
3ef0c40962
WIN32_EXECUTABLE: Add support for generator expressions
2020-08-21 09:17:27 -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
Thomas Bernard
20ebaed972
Clang: Add support for passing VFS arguments
2020-08-07 11:52:45 -04:00
Brad King
89e5f95c2b
Merge topic 'reuse_pch_no_delay'
...
ef97fbe6c2 PCH: Avoid unnecessary 30s delay on MSBuild Generator with REUSE_FROM
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5102
2020-08-06 10:39:47 -04:00
Cristian Adam
ef97fbe6c2
PCH: Avoid unnecessary 30s delay on MSBuild Generator with REUSE_FROM
...
Fix logic added by commit 1f791eb160 (Multi-Ninja: Fix reusable PCHs for
MSVC, 2020-05-24, v3.18.0-rc1~72^2) to avoid an unnecessary delay.
Fixes : #21054
2020-08-05 15:52:05 -04:00
Brad King
8878f59cf9
Merge topic 'unity_no_skip_autogen'
...
7051250a6c Unity Builds: Do not set SKIP_AUTOGEN to source files
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5081
2020-07-30 08:28:49 -04:00
Cristian Adam
7051250a6c
Unity Builds: Do not set SKIP_AUTOGEN to source files
...
Fixes : #21028
2020-07-29 17:57:50 +02:00
Vitaly Stakhovsky
f37c14e930
Source: use cmNonempty()
2020-07-28 08:31:31 -04:00
Brad King
2f0790df50
Factor out generator checks for filtering on non-compiling targets
...
Add a `cmGeneratorTarget::CanCompileSources` helper method to tell
generators whether a target might compile anything.
2020-07-23 13:31:45 -04:00
Brad King
422d9a0ab2
Factor out generator checks for filtering out interface libraries
...
Add a `cmGeneratorTarget::IsInBuildSystem` helper method to tell
generators whether a target should participate in the generated build
system.
2020-07-23 13:31:44 -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
Brad King
4662c041ea
Merge topic 'move_more_queries_to_cmStandardLevelResolver'
...
56cf509a72 Move AddCompilerRequirementFlag to cmStandardLevelResolver
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4989
2020-07-16 10:17:52 -04:00
Kyle Edwards
63ecf481da
Merge topic 'cmnonempty'
...
eaad8072ee cmNonempty: Convenience inlines to check for non-empty string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5017
2020-07-15 10:53:43 -04:00
Robert Maynard
56cf509a72
Move AddCompilerRequirementFlag to cmStandardLevelResolver
...
The cmLocalGenerator::AddCompilerRequirementFlag was another
source of truth on what standard levels existed per language,
so fold that into cmStandardLevelResolver to make updating
CMake easier
2020-07-15 09:40:33 -04:00
Vitaly Stakhovsky
eaad8072ee
cmNonempty: Convenience inlines to check for non-empty string
2020-07-14 15:18:59 -04:00
Vitaly Stakhovsky
7156911242
cmIsOn: add overload accepting const std::string*
2020-07-14 08:22:24 -04:00
Vitaly Stakhovsky
18726ad634
GetFeature(): return cmProp
2020-07-11 14:03:03 -04:00
Brad King
a4cfc7d03c
Merge topic 'refactor-generator-configs'
...
7a969fe21d cmMakefile: Refactor API to better handle empty config values
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4957
2020-07-06 09:28:11 -04:00
Robert Maynard
7a969fe21d
cmMakefile: Refactor API to better handle empty config values
2020-07-03 07:43:18 -04:00
Robert Maynard
dc94b0249e
cmStandardLevelResolver: Added to handle standard level queries
...
Refactored out of cmMakefile
2020-07-01 07:58:58 -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