mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-06 22:30:07 -05:00
@@ -171,6 +171,7 @@ Properties on Targets
|
|||||||
/prop_tgt/DEBUG_POSTFIX
|
/prop_tgt/DEBUG_POSTFIX
|
||||||
/prop_tgt/DEFINE_SYMBOL
|
/prop_tgt/DEFINE_SYMBOL
|
||||||
/prop_tgt/DEPLOYMENT_REMOTE_DIRECTORY
|
/prop_tgt/DEPLOYMENT_REMOTE_DIRECTORY
|
||||||
|
/prop_tgt/DOTNET_TARGET_FRAMEWORK_VERSION
|
||||||
/prop_tgt/EchoString
|
/prop_tgt/EchoString
|
||||||
/prop_tgt/ENABLE_EXPORTS
|
/prop_tgt/ENABLE_EXPORTS
|
||||||
/prop_tgt/EXCLUDE_FROM_ALL
|
/prop_tgt/EXCLUDE_FROM_ALL
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ Variables that Provide Information
|
|||||||
/variable/CMAKE_CURRENT_SOURCE_DIR
|
/variable/CMAKE_CURRENT_SOURCE_DIR
|
||||||
/variable/CMAKE_DIRECTORY_LABELS
|
/variable/CMAKE_DIRECTORY_LABELS
|
||||||
/variable/CMAKE_DL_LIBS
|
/variable/CMAKE_DL_LIBS
|
||||||
|
/variable/CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION
|
||||||
/variable/CMAKE_EDIT_COMMAND
|
/variable/CMAKE_EDIT_COMMAND
|
||||||
/variable/CMAKE_EXECUTABLE_SUFFIX
|
/variable/CMAKE_EXECUTABLE_SUFFIX
|
||||||
/variable/CMAKE_EXTRA_GENERATOR
|
/variable/CMAKE_EXTRA_GENERATOR
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
DOTNET_TARGET_FRAMEWORK_VERSION
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
Specify the .NET target framework version.
|
||||||
|
|
||||||
|
Used to specify the .NET target framework version for C++/CLI. For
|
||||||
|
example, "v4.5".
|
||||||
|
|
||||||
|
This property is only evaluated for :ref:`Visual Studio Generators`
|
||||||
|
VS 2010 and above.
|
||||||
|
|
||||||
|
Can be initialized for all targets using the variable
|
||||||
|
:variable:`CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION`.
|
||||||
@@ -5,3 +5,6 @@ Specify the .NET target framework version.
|
|||||||
|
|
||||||
Used to specify the .NET target framework version for C++/CLI. For
|
Used to specify the .NET target framework version for C++/CLI. For
|
||||||
example, "v4.5".
|
example, "v4.5".
|
||||||
|
|
||||||
|
This property is deprecated and should not be used anymore. Use
|
||||||
|
:prop_tgt:`DOTNET_TARGET_FRAMEWORK_VERSION` instead.
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
dotnet-target-fw-initialization
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
* The :prop_tgt:`DOTNET_TARGET_FRAMEWORK_VERSION` target property
|
||||||
|
was introduced as replacement for
|
||||||
|
:prop_tgt:`VS_DOTNET_TARGET_FRAMEWORK_VERSION`, which is considered
|
||||||
|
deprecated now.
|
||||||
|
|
||||||
|
* The :variable:`CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION` variable
|
||||||
|
was defined to initialize all
|
||||||
|
:prop_tgt:`DOTNET_TARGET_FRAMEWORK_VERSION` target properties.
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION
|
||||||
|
-------------------------------------
|
||||||
|
|
||||||
|
Default value for :prop_tgt:`DOTNET_TARGET_FRAMEWORK_VERSION`
|
||||||
|
property of targets.
|
||||||
|
|
||||||
|
This variable is used to initialize the
|
||||||
|
:prop_tgt:`DOTNET_TARGET_FRAMEWORK_VERSION` property on all
|
||||||
|
targets. See that target property for additional information.
|
||||||
|
|
||||||
|
Setting ``CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION`` may be necessary
|
||||||
|
when working with ``C#`` and newer .NET framework versions to
|
||||||
|
avoid referencing errors with the ``ALL_BUILD`` CMake target.
|
||||||
|
|
||||||
|
This variable is only evaluated for :ref:`Visual Studio Generators`
|
||||||
|
VS 2010 and above.
|
||||||
@@ -399,6 +399,10 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
|
|||||||
this->SetPropertyDefault("JOB_POOL_COMPILE", nullptr);
|
this->SetPropertyDefault("JOB_POOL_COMPILE", nullptr);
|
||||||
this->SetPropertyDefault("JOB_POOL_LINK", nullptr);
|
this->SetPropertyDefault("JOB_POOL_LINK", nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this->TargetTypeValue <= cmStateEnums::UTILITY) {
|
||||||
|
this->SetPropertyDefault("DOTNET_TARGET_FRAMEWORK_VERSION", nullptr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cmGlobalGenerator* cmTarget::GetGlobalGenerator() const
|
cmGlobalGenerator* cmTarget::GetGlobalGenerator() const
|
||||||
|
|||||||
@@ -481,10 +481,17 @@ void cmVisualStudio10TargetGenerator::Generate()
|
|||||||
projLabel = this->Name.c_str();
|
projLabel = this->Name.c_str();
|
||||||
}
|
}
|
||||||
e1.Element("ProjectName", projLabel);
|
e1.Element("ProjectName", projLabel);
|
||||||
if (const char* targetFrameworkVersion =
|
{
|
||||||
this->GeneratorTarget->GetProperty(
|
// TODO: add deprecation warning for VS_* property?
|
||||||
"VS_DOTNET_TARGET_FRAMEWORK_VERSION")) {
|
const char* targetFrameworkVersion = this->GeneratorTarget->GetProperty(
|
||||||
e1.Element("TargetFrameworkVersion", targetFrameworkVersion);
|
"VS_DOTNET_TARGET_FRAMEWORK_VERSION");
|
||||||
|
if (!targetFrameworkVersion) {
|
||||||
|
targetFrameworkVersion = this->GeneratorTarget->GetProperty(
|
||||||
|
"DOTNET_TARGET_FRAMEWORK_VERSION");
|
||||||
|
}
|
||||||
|
if (targetFrameworkVersion) {
|
||||||
|
e1.Element("TargetFrameworkVersion", targetFrameworkVersion);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disable the project upgrade prompt that is displayed the first time a
|
// Disable the project upgrade prompt that is displayed the first time a
|
||||||
|
|||||||
Reference in New Issue
Block a user