mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 06:09:52 -06:00
project: Always set COMPAT_VERSION variables
Modify the project command to always set COMPAT_VERSION variables, not just if experimental CPS export support is enabled. This ensures that these values are (at least as of the call to the project command) empty and cannot be "preset" e.g. by command line arguments in the case that experimental support is enabled after the project command is called.
This commit is contained in:
@@ -262,13 +262,10 @@ bool cmProjectCommand(std::vector<std::string> const& args,
|
||||
createVariables("VERSION_MINOR"_s, version_components[1]);
|
||||
createVariables("VERSION_PATCH"_s, version_components[2]);
|
||||
createVariables("VERSION_TWEAK"_s, version_components[3]);
|
||||
createVariables("COMPAT_VERSION"_s, prArgs.CompatVersion.value_or(""));
|
||||
createVariables("DESCRIPTION"_s, prArgs.Description.value_or(""));
|
||||
createVariables("HOMEPAGE_URL"_s, prArgs.HomepageURL.value_or(""));
|
||||
|
||||
if (enableCompatVersion) {
|
||||
createVariables("COMPAT_VERSION"_s, prArgs.CompatVersion.value_or(""));
|
||||
}
|
||||
|
||||
if (unparsedArgs.empty() && !prArgs.Languages) {
|
||||
// if no language is specified do c and c++
|
||||
mf.EnableLanguage({ "C", "CXX" }, false);
|
||||
|
||||
Reference in New Issue
Block a user