Commit Graph

19 Commits

Author SHA1 Message Date
Kyle Edwards 8b799f80e3 Ninja Multi-Config: Fix spurious unused variable warning
Fixes: #20381
2020-03-03 15:52:36 -05:00
Kyle Edwards c794b70f19 Ninja Multi-Config: Always generate build.ninja
If CMAKE_DEFAULT_BUILD_TYPE is not specified, use the first item
from CMAKE_CONFIGURATION_TYPES instead.
2020-02-27 10:39:35 -05:00
Kyle Edwards 7a63dafafb Ninja Multi-Config: Remove "NMC" from variable names
Also rename `..._DEFAULT_BUILD_FILE_CONFIG` to `..._DEFAULT_BUILD_TYPE`.
These name changes make the variables meaningful for future use by other
generators.
2020-02-27 09:22:08 -05:00
Kyle Edwards 7abc3d61ac Ninja Multi-Config: Fix issue with framework dependencies and Autogen
Fixes: #20345
2020-02-17 08:24:57 -05:00
Kyle Edwards 46c836644d Ninja Multi-Config: Fix issue with "all" in CMAKE_NMC_DEFAULT_CONFIGS
Prior to this fix, CMAKE_NMC_DEFAULT_CONFIGS would inherit "all" from
the union of CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG and
CMAKE_NMC_CROSS_CONFIGS. This is inconsistent with the behavior of the
"all" target signifying CMAKE_NMC_CROSS_CONFIGS. Update "all" in
CMAKE_NMC_DEFAULT_CONFIGS to inherit only from CMAKE_NMC_CROSS_CONFIGS.
2020-02-11 10:49:54 -05:00
Kyle Edwards 67102d3252 Ninja Multi-Config: Add support for DEPFILE option in add_custom_command()
And give other generators a path forward to add support in the future.
2020-02-07 14:18:54 -05:00
Brad King 135378fd18 Merge topic 'ninja-multi-default-config-fix' into release-3.17
1844be451e Ninja Multi-Config: Fix issue with CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4331
2020-02-07 09:26:36 -05:00
Kyle Edwards 1844be451e Ninja Multi-Config: Fix issue with CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG
Fix an issue where CMAKE_NMC_DEFAULT_BUILD_FILE_CONFIG is specified
and CMAKE_NMC_CROSS_CONFIGS is not, which results in a false error
with CMAKE_NMC_DEFAULT_CONFIGS.
2020-02-06 14:31:13 -05:00
Kyle Edwards 9e219de4fb Ninja Multi-Config: Don't include MinSizeRel by default 2020-02-06 11:07:38 -05:00
Kyle Edwards 16a4ba5b31 Ninja Multi-Config: Use build.ninja if cmake --build has no --config
If cmake --build is called with no --config argument, and a
build.ninja file is available, use that instead of defaulting to the
Debug config.
2020-02-04 14:13:07 -05:00
Kyle Edwards b966f86d86 Ninja Multi-Config: Shuffle variables around
Remove redundant variable CMAKE_NINJA_MULTI_CROSS_CONFIG_ENABLE.
Rename other variables. Document and improve handling of error
conditions.
2020-02-03 13:27:51 -05:00
Kyle Edwards 63c9cd2088 Ninja Multi-Config: Fix bug with MacOS frameworks 2020-01-24 17:16:25 -05:00
Kyle Edwards b7a2baf38c Ninja Multi-Config: Add variable to control configs used in cross-config build 2020-01-23 15:47:12 -05:00
Kyle Edwards 8337ed0d73 Ninja Multi-Config: Add variable to control aliases in build.ninja 2020-01-22 10:26:21 -05:00
Kyle Edwards 110037369d Refactor: Split Ninja files into impl-<Config>.ninja and build-<Config>.ninja 2020-01-22 10:26:21 -05:00
Kyle Edwards 310b58e961 Ninja Multi-Config: Rename variable to be more consistent
Also make some tweaks to the documentation.
2020-01-16 10:34:43 -05:00
Robert Maynard c7ac13e8ed CUDA: Mult-Config Ninja generator now supports CUDA 2020-01-13 12:50:37 -05:00
Kyle Edwards e8032e202e Ninja Multi-Config: Make cross-config building opt-in
Many users will want to use the Ninja Multi-Config generator like a
traditional Visual Studio-style multi-config generator, which doesn't
mix configurations - custom commands are built using target executables
of the same configuration the command is for. We do not want to force
these people to generate an N*N build matrix when they only need N*1,
especially if they have lots of targets. Add a new variable,
CMAKE_NINJA_CROSS_CONFIG_ENABLE, to opt-in to the cross-config build
matrix.
2020-01-10 16:31:29 -05:00
Kyle Edwards e0478cc646 Tests: Add test for Multi-Configuration Ninja generator 2019-12-13 10:52:07 -05:00