mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-30 02:59:22 -05:00
llvm-rc: Add CMAKE_VFS_OVERLAY to the preprocessing flags
Issue: #20658
This commit is contained in:
committed by
Brad King
parent
6aff058ab4
commit
18ee6d7e32
@@ -1940,9 +1940,11 @@ void cmLocalGenerator::AddLanguageFlags(std::string& flags,
|
|||||||
this->AddConfigVariableFlags(flags, cmStrCat("CMAKE_", lang, "_FLAGS"),
|
this->AddConfigVariableFlags(flags, cmStrCat("CMAKE_", lang, "_FLAGS"),
|
||||||
config);
|
config);
|
||||||
|
|
||||||
std::string const& compiler = this->Makefile->GetSafeDefinition(
|
std::string compiler = this->Makefile->GetSafeDefinition(
|
||||||
cmStrCat("CMAKE_", lang, "_COMPILER_ID"));
|
cmStrCat("CMAKE_", lang, "_COMPILER_ID"));
|
||||||
|
|
||||||
|
std::string compilerSimulateId = this->Makefile->GetSafeDefinition(
|
||||||
|
cmStrCat("CMAKE_", lang, "_SIMULATE_ID"));
|
||||||
if (lang == "Swift") {
|
if (lang == "Swift") {
|
||||||
if (cmProp v = target->GetProperty("Swift_LANGUAGE_VERSION")) {
|
if (cmProp v = target->GetProperty("Swift_LANGUAGE_VERSION")) {
|
||||||
if (cmSystemTools::VersionCompare(cmSystemTools::OP_GREATER_EQUAL,
|
if (cmSystemTools::VersionCompare(cmSystemTools::OP_GREATER_EQUAL,
|
||||||
@@ -1957,14 +1959,24 @@ void cmLocalGenerator::AddLanguageFlags(std::string& flags,
|
|||||||
target->AddCUDAToolkitFlags(flags);
|
target->AddCUDAToolkitFlags(flags);
|
||||||
} else if (lang == "ISPC") {
|
} else if (lang == "ISPC") {
|
||||||
target->AddISPCTargetFlags(flags);
|
target->AddISPCTargetFlags(flags);
|
||||||
|
} else if (lang == "RC" &&
|
||||||
|
this->Makefile->GetSafeDefinition("CMAKE_RC_COMPILER")
|
||||||
|
.find("llvm-rc") != std::string::npos) {
|
||||||
|
compiler = this->Makefile->GetSafeDefinition("CMAKE_C_COMPILER_ID");
|
||||||
|
if (!compiler.empty()) {
|
||||||
|
compilerSimulateId =
|
||||||
|
this->Makefile->GetSafeDefinition("CMAKE_C_SIMULATE_ID");
|
||||||
|
} else {
|
||||||
|
compiler = this->Makefile->GetSafeDefinition("CMAKE_CXX_COMPILER_ID");
|
||||||
|
compilerSimulateId =
|
||||||
|
this->Makefile->GetSafeDefinition("CMAKE_CXX_SIMULATE_ID");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add VFS Overlay for Clang compiliers
|
// Add VFS Overlay for Clang compiliers
|
||||||
if (compiler == "Clang") {
|
if (compiler == "Clang") {
|
||||||
if (cmProp vfsOverlay =
|
if (cmProp vfsOverlay =
|
||||||
this->Makefile->GetDefinition("CMAKE_CLANG_VFS_OVERLAY")) {
|
this->Makefile->GetDefinition("CMAKE_CLANG_VFS_OVERLAY")) {
|
||||||
std::string const& compilerSimulateId =
|
|
||||||
this->Makefile->GetSafeDefinition(
|
|
||||||
cmStrCat("CMAKE_", lang, "_SIMULATE_ID"));
|
|
||||||
if (compilerSimulateId == "MSVC") {
|
if (compilerSimulateId == "MSVC") {
|
||||||
this->AppendCompileOptions(
|
this->AppendCompileOptions(
|
||||||
flags,
|
flags,
|
||||||
|
|||||||
Reference in New Issue
Block a user