mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 06:40:16 -05:00
<LANG>_COMPILER_LAUNCHER: Expand subset of genexes that can be evaluated
This commit is contained in:
@@ -1044,7 +1044,8 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
|
|||||||
std::string const clauncher_prop = lang + "_COMPILER_LAUNCHER";
|
std::string const clauncher_prop = lang + "_COMPILER_LAUNCHER";
|
||||||
cmValue clauncher = this->GeneratorTarget->GetProperty(clauncher_prop);
|
cmValue clauncher = this->GeneratorTarget->GetProperty(clauncher_prop);
|
||||||
std::string evaluatedClauncher = cmGeneratorExpression::Evaluate(
|
std::string evaluatedClauncher = cmGeneratorExpression::Evaluate(
|
||||||
*clauncher, this->LocalGenerator, config);
|
*clauncher, this->LocalGenerator, config, this->GeneratorTarget,
|
||||||
|
nullptr, this->GeneratorTarget, lang);
|
||||||
if (!evaluatedClauncher.empty()) {
|
if (!evaluatedClauncher.empty()) {
|
||||||
compilerLauncher = evaluatedClauncher;
|
compilerLauncher = evaluatedClauncher;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -886,7 +886,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang,
|
|||||||
std::string const clauncher_prop = cmStrCat(lang, "_COMPILER_LAUNCHER");
|
std::string const clauncher_prop = cmStrCat(lang, "_COMPILER_LAUNCHER");
|
||||||
cmValue clauncher = this->GeneratorTarget->GetProperty(clauncher_prop);
|
cmValue clauncher = this->GeneratorTarget->GetProperty(clauncher_prop);
|
||||||
std::string evaluatedClauncher = cmGeneratorExpression::Evaluate(
|
std::string evaluatedClauncher = cmGeneratorExpression::Evaluate(
|
||||||
*clauncher, this->LocalGenerator, config);
|
*clauncher, this->LocalGenerator, config, this->GeneratorTarget, nullptr,
|
||||||
|
this->GeneratorTarget, lang);
|
||||||
if (!evaluatedClauncher.empty()) {
|
if (!evaluatedClauncher.empty()) {
|
||||||
compilerLauncher = evaluatedClauncher;
|
compilerLauncher = evaluatedClauncher;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
.*-E env USED_LAUNCHER=1.*
|
.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=C.*
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
.*-E env USED_LAUNCHER=1.*
|
.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=C.*
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
.*-E env USED_LAUNCHER=1.*
|
.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=CUDA.*
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
.*-E env USED_LAUNCHER=1.*
|
.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=CUDA.*
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
.*-E env USED_LAUNCHER=1.*
|
.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=CXX.*
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
.*-E env USED_LAUNCHER=1.*
|
.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=CXX.*
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
.*-E env USED_LAUNCHER=1.*
|
.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=Fortran.*
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
.*-E env USED_LAUNCHER=1.*
|
.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=Fortran.*
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
.*-E env USED_LAUNCHER=1.*
|
.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=HIP.*
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
.*-E env USED_LAUNCHER=1.*
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=HIP.*
|
||||||
@@ -1 +1 @@
|
|||||||
.*-E env USED_LAUNCHER=1.*
|
.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=ISPC.*
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
.*-E env USED_LAUNCHER=1.*
|
.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=ISPC.*
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
.*-E env USED_LAUNCHER=1.*
|
.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJC.*
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
.*-E env USED_LAUNCHER=1.*
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJC.*
|
||||||
@@ -1 +1 @@
|
|||||||
.*-E env USED_LAUNCHER=1.*
|
.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJCXX.*
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
.*-E env USED_LAUNCHER=1.*
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJCXX.*
|
||||||
@@ -18,7 +18,7 @@ endfunction()
|
|||||||
function(run_compiler_launcher_env lang)
|
function(run_compiler_launcher_env lang)
|
||||||
string(REGEX REPLACE "-.*" "" core_lang "${lang}")
|
string(REGEX REPLACE "-.*" "" core_lang "${lang}")
|
||||||
# Use the noop genexp $<PATH:...> genexp to validate genexp support.
|
# Use the noop genexp $<PATH:...> genexp to validate genexp support.
|
||||||
set(ENV{CMAKE_${core_lang}_COMPILER_LAUNCHER} "$<PATH:CMAKE_PATH,${CMAKE_COMMAND}>;-E;env;USED_LAUNCHER=1")
|
set(ENV{CMAKE_${core_lang}_COMPILER_LAUNCHER} "$<PATH:CMAKE_PATH,${CMAKE_COMMAND}>;-E;env;USED_LAUNCHER=1;TARGET_NAME=$<TARGET_PROPERTY:NAME>;LANGUAGE=$<COMPILE_LANGUAGE>")
|
||||||
run_compiler_launcher(${lang})
|
run_compiler_launcher(${lang})
|
||||||
unset(ENV{CMAKE_${core_lang}_COMPILER_LAUNCHER})
|
unset(ENV{CMAKE_${core_lang}_COMPILER_LAUNCHER})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|||||||
Reference in New Issue
Block a user