1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-06-22 20:34:08 +08:00

1283 Commits

Author SHA1 Message Date
Kinan Mahdi
3fd07d30bf VS: Enable DOTNET_TARGET_FRAMEWORK properties all target types
This makes them compatible with `VS_PACKAGE_REFERENCES` and, in
particular, fixes nuget package references in combination with install
targets.

Fixes: #20764
2020-06-05 08:01:59 -04:00
Brad King
62816ff88c Merge topic 'fortran-preprocess-property'
3888de23da Ninja: Skip Fortran preprocessing if Fortran_PREPROCESS is OFF
66c4e87282 Ninja: Add helper functions to generate Fortran build
5cca1ec893 Ninja: Add helper functions to generate Fortran preprocess rule
b0a6161190 Fortran: Add Fortran_PREPROCESS property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4659
2020-05-22 10:35:10 -04:00
Peter Hill
b0a6161190 Fortran: Add Fortran_PREPROCESS property
Issue: #18870
2020-05-21 11:44:14 -04:00
Brad King
d6a88d2158 cmTarget: Replace "perConfig" constructor boolean with enum 2020-05-18 12:56:55 -04:00
Robert Maynard
9f4eb352fe Unity Builds: Support explicit specification of sources to groups
Instead of having CMake determine which files should go into each
unity file, the user can now use explicitly state the mapping.
2020-05-07 11:13:34 -04:00
Vitaly Stakhovsky
53675adbcf GetSafeProperty: return std::string const& 2020-04-30 10:27:16 -04:00
Brad King
7e8df1bb24 Merge topic 'cuda_architectures'
21131ca60c CUDA: Add CudaOnly.CompileFlags test
f0931b0790 CUDA: Convert tests to use CUDA_ARCHITECTURES
e98588aaba CUDA: Add CUDA_ARCHITECTURES target property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Patrick Stotko <stotko@cs.uni-bonn.de>
Merge-request: !4568
2020-04-16 11:11:33 -04:00
Raul Tambre
e98588aaba CUDA: Add CUDA_ARCHITECTURES target property
Simplifies CUDA target architecture handling.

Required for Clang support as Clang doesn't automatically select a supported architecture.
We detect a supported architecture during compiler identification and set CMAKE_CUDA_ARCHITECTURES to it.

Introduces CMP0104 for backwards compatibility with manually setting code generation flags with NVCC.

Implements #17963.
2020-04-15 17:55:41 +03:00
Brad King
45d61f9f89 Merge topic 'ibmi-aix-exports'
420e91c951 AIX: Activate symbol export/import IBM i (OS400)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4611
2020-04-15 09:39:56 -04:00
Brad King
420e91c951 AIX: Activate symbol export/import IBM i (OS400)
Fixes: #20582
2020-04-14 14:45:51 -04:00
Vitaly Stakhovsky
3eec21a01c cmTarget::GetProperty: return cmProp 2020-03-30 15:00:14 -04:00
Vitaly Stakhovsky
a4255ecf81 cmStateDirectory::GetProperty: return cmProp 2020-03-27 12:33:04 -04:00
Brad King
f670435715 Merge topic 'pch-warn-invalid'
2ce08e5489 PCH: add an option to disable `-Winvalid-pch`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4499
2020-03-27 08:03:30 -04:00
Cristian Adam
2ce08e5489 PCH: add an option to disable -Winvalid-pch
Fixes: #20295
2020-03-26 14:24:46 +01:00
Brad King
6a0c1726e0 Merge topic 'cleanup-endls-2'
1e4b5c7d09 Refactor: Avoid `std::endl` where it's not necessary (part 2)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4514
2020-03-26 09:18:25 -04:00
Alex Turbov
1e4b5c7d09
Refactor: Avoid std::endl where it's not necessary (part 2)
The `std::endl` manipulator, except inserting `\n` character, also
performs `os.flush()`, which may lead to undesired effects (like
disk I/O in the middle of forming data strings). For the
`std::stringstream` it also has no meaning.

* replace multiple `operator<<` calls on a string literal w/
  the only call and the only (bigger) string literal;
* replace one character string literal used in `operator<<`
  w/ a char literal.
2020-03-24 21:32:05 +08:00
Vitaly Stakhovsky
ef408dd232 cmState::GetTargetTypeName: return type is *cmProp 2020-03-19 08:55:03 -04:00
Vitaly Stakhovsky
b915fec56e cmTarget: minor code improvements 2020-03-17 08:33:57 -04:00
Brad King
97562a2023 Merge topic 'property-computer'
fad0ee5404 cmTargetPropertyComputer::GetProperty: return cmProp

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4482
2020-03-17 08:06:18 -04:00
Vitaly Stakhovsky
fad0ee5404 cmTargetPropertyComputer::GetProperty: return cmProp 2020-03-16 13:47:05 -04:00
Vitaly Stakhovsky
60f57d0dcc cmPropertyMap: Introduce cmProp as return type for GetProperty() functions
Currently properties are usually stored internally as `std::string`.
However, family of GetProperty() functions return them as `const char *` using `c_str()`.
The proposed `cmProp`, typedef'ed as `const std::string *` will expose properties
more naturally.
2020-03-13 13:32:17 -04:00
Vitaly Stakhovsky
36a5b3d1d1 cmMakefile::AddCacheDefinition: Add overload that accepts std::string value 2020-03-11 09:40:43 -04:00
Alexandru Croitor
ad3f69c86e Add support for FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG> 2020-03-04 14:30:54 +01:00
Kyle Edwards
7abc3d61ac Ninja Multi-Config: Fix issue with framework dependencies and Autogen
Fixes: #20345
2020-02-17 08:24:57 -05:00
Brad King
afcd9fe669 AIX: Add an option to disable automatic exports from shared libraries
Since commit 0f150b69d3 (AIX: Explicitly compute shared object exports
for both XL and GNU, 2019-07-11, v3.16.0-rc1~418^2~2) we always export
all symbols from shared libraries by default.  Add a new target property
called `AIX_EXPORT_ALL_SYMBOLS` that can be explicitly set to OFF to
suppress this behavior and export no symbols by default.

Fixes: #20290
2020-01-31 09:34:06 -05:00
Vitaly Stakhovsky
bbc07e4561 Source: use std::string in place of const char* 2020-01-29 14:31:01 -05:00
Brad King
e3be80f4fc Merge topic 'append-std-string'
1398517f31 AppendProperty: convert value param to std::string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4282
2020-01-28 11:00:16 -05:00
Brad King
1f9321c683 Merge topic 'cuda_runtime_library_controls'
0d0145138f CUDA: Add abstraction for cuda runtime selection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4178
2020-01-28 10:52:33 -05:00
Robert Maynard
0d0145138f CUDA: Add abstraction for cuda runtime selection
Fixes #17559
Replace our hard-coded default of cudart=static with a first-class abstraction to select the runtime library from an enumeration of logical names.
2020-01-27 16:02:26 -05:00
Vitaly Stakhovsky
1398517f31 AppendProperty: convert value param to std::string 2020-01-25 10:37:00 -05:00
Joerg Bornemann
ae1e1909a1 VS: Add support for .NET Standard and .NET Core
Fixes: #20105
2020-01-24 09:11:05 -05:00
Brad King
a7fca06c46 Merge topic 'out-of-dir-link-list'
f0e67da061 target_link_libraries: Fix out-of-dir linking of a list of targets
acee629103 cmTargetLinkLibrariesCommand: Move HandleLibrary to helper struct
ba675f1ecc Tests: Enable CMP0022 in ExportImport out-of-dir linking case

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4226
2020-01-17 09:41:10 -05:00
Brad King
f0e67da061 target_link_libraries: Fix out-of-dir linking of a list of targets
In a case like

    target_link_libraries(targetInOtherDir PUBLIC "$<1:a;b>")

then all entries in the list need to be looked up in the caller's
scope.  Previously our `::@(directory-id)` suffix would apply only
to the last entry.  Instead surround the entire entry by a pair
`::@(directory-id);...;::@` so that the `::@` syntax can encode
a directory lookup scope change evaluated as the list is processed.

Fixes: #20204
2020-01-16 13:24:27 -05:00
Brad King
05738b5f21 Merge topic 'pch_job_pool'
97c124e30f Ninja: Add a separate job pool for PCH creation
ebd0b16ddb vim: Add target_precompile_headers command highlighting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Cristian Adam <cristian.adam@gmail.com>
Merge-request: !4224
2020-01-16 10:33:48 -05:00
Dan Johnston
97c124e30f Ninja: Add a separate job pool for PCH creation
Add a `JOB_POOL_PRECOMPILE_HEADER` target property to specify the pool
name, and its associated `CMAKE_JOB_POOL_PRECOMPILE_HEADER` variable.

Fixes: #20217
2020-01-16 10:32:25 -05:00
Marc Chevrier
f466cea3c9 cmMakefile: modernize memory management 2020-01-14 11:03:07 +01:00
Brad King
eb672da7d4 Merge topic 'objc-compiler-launcher'
f6ef6e5a73 Merge branch 'backport-3.16-objc-compiler-launcher'
1a9f6bad98 ObjC: Add _COMPILE_LAUNCHER support
a05b9d4239 ObjC: Add _COMPILE_LAUNCHER support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4189
2020-01-10 13:18:35 -05:00
Cristian Adam
1a9f6bad98 ObjC: Add _COMPILE_LAUNCHER support
Fixes: #20178
2020-01-09 13:52:37 -05:00
Luca Cappa
353405daef Add support for FOLDER target property to custom targets
Fixes: #18372
2020-01-09 11:55:12 -05:00
Cristian Adam
a05b9d4239 ObjC: Add _COMPILE_LAUNCHER support
Fixes: #20178
2020-01-09 11:35:23 -05:00
Brad King
0607a50bb3 Merge topic 'add-header-cmext-algorithm'
f7d12609f0 Refactoring: use append functions from cmext/algorithm
a38d04c076 Refactoring: introduce header cmext/algorithm with append functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4131
2019-12-18 09:32:03 -05:00
Brad King
64e2891cbd Merge topic 'stdstring-target'
c34b4497f8 cmTarget: add std::string overloads

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4137
2019-12-17 11:09:20 -05:00
Marc Chevrier
f7d12609f0 Refactoring: use append functions from cmext/algorithm 2019-12-17 10:44:02 +01:00
Vitaly Stakhovsky
c34b4497f8 cmTarget: add std::string overloads 2019-12-14 09:30:28 -05:00
Kyle Edwards
5a8a9f7229 Ninja: Add multi-config variant
Co-Authored-by: vector-of-bool <vectorofbool@gmail.com>
2019-12-13 10:51:46 -05:00
Gregor Jasny
92c4c852db Xcode: Add custom working directory property
Closes: #19967
2019-11-18 22:34:34 +01:00
Brad King
e14c9af013 Merge topic 'pch-reuse-no-prop'
bb4c2781ce PCH: Do not issue an error on duplicate target_precompile_headers call

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4046
2019-11-18 09:46:26 -05:00
Cristian Adam
bb4c2781ce PCH: Do not issue an error on duplicate target_precompile_headers call
Fixes: #19970
2019-11-15 09:47:56 -05:00
Brad King
5c8d821eca Merge topic 'xcode-scheme-env'
f0005dacde Xcode: Add CMAKE_XCODE_SCHEME_ENVIRONMENT variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3933
2019-10-25 09:37:49 -04:00
Felix Heidrich
f0005dacde Xcode: Add CMAKE_XCODE_SCHEME_ENVIRONMENT variable
Initialize the `XCODE_SCHEME_ENVIRONMENT` target property.

This was left out of commit 6b7f1e1db0 (Xcode: Add variables and
properties to configure schemes, 2018-07-29, v3.13.0-rc1~243^2).
2019-10-24 11:24:34 -04:00