summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-03-18 13:42:16 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-03-18 13:42:44 (GMT)
commit7483843816bb413b730a5df7f28f5c07a3d81ac6 (patch)
treeb08251e9ecad37746f4063f62ad17e4b7c1ab48f /Source
parentf3d9cedc8becb7162a909799a9a38b716d8a44b8 (diff)
parent56c759b000ab5041aff9a92d51a6cc471e7d34a4 (diff)
downloadCMake-7483843816bb413b730a5df7f28f5c07a3d81ac6.zip
CMake-7483843816bb413b730a5df7f28f5c07a3d81ac6.tar.gz
CMake-7483843816bb413b730a5df7f28f5c07a3d81ac6.tar.bz2
Merge topic 'lang_win32_console'
56c759b000 Per-language Win32/Console flags Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5906
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx8
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx7
2 files changed, 9 insertions, 6 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 79d1de0..b301c6e 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1527,12 +1527,12 @@ void cmLocalGenerator::GetTargetFlags(
}
if (target->IsWin32Executable(config)) {
- exeFlags +=
- this->Makefile->GetSafeDefinition("CMAKE_CREATE_WIN32_EXE");
+ exeFlags += this->Makefile->GetSafeDefinition(
+ cmStrCat("CMAKE_", linkLanguage, "_CREATE_WIN32_EXE"));
exeFlags += " ";
} else {
- exeFlags +=
- this->Makefile->GetSafeDefinition("CMAKE_CREATE_CONSOLE_EXE");
+ exeFlags += this->Makefile->GetSafeDefinition(
+ cmStrCat("CMAKE_", linkLanguage, "_CREATE_CONSOLE_EXE"));
exeFlags += " ";
}
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index 1750e37..6783341 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -384,11 +384,14 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
if (this->GeneratorTarget->IsWin32Executable(
this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"))) {
this->LocalGenerator->AppendFlags(
- linkFlags, this->Makefile->GetSafeDefinition("CMAKE_CREATE_WIN32_EXE"));
+ linkFlags,
+ this->Makefile->GetSafeDefinition(
+ cmStrCat("CMAKE_", linkLanguage, "_CREATE_WIN32_EXE")));
} else {
this->LocalGenerator->AppendFlags(
linkFlags,
- this->Makefile->GetSafeDefinition("CMAKE_CREATE_CONSOLE_EXE"));
+ this->Makefile->GetSafeDefinition(
+ cmStrCat("CMAKE_", linkLanguage, "_CREATE_CONSOLE_EXE")));
}
// Add symbol export flags if necessary.