diff options
22 files changed, 21 insertions, 19 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 9df1af7..befb472 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1044,7 +1044,8 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles( std::string const clauncher_prop = lang + "_COMPILER_LAUNCHER"; cmValue clauncher = this->GeneratorTarget->GetProperty(clauncher_prop); std::string evaluatedClauncher = cmGeneratorExpression::Evaluate( - *clauncher, this->LocalGenerator, config); + *clauncher, this->LocalGenerator, config, this->GeneratorTarget, + nullptr, this->GeneratorTarget, lang); if (!evaluatedClauncher.empty()) { compilerLauncher = evaluatedClauncher; } diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 6887376..9d8f116 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -886,7 +886,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang, std::string const clauncher_prop = cmStrCat(lang, "_COMPILER_LAUNCHER"); cmValue clauncher = this->GeneratorTarget->GetProperty(clauncher_prop); std::string evaluatedClauncher = cmGeneratorExpression::Evaluate( - *clauncher, this->LocalGenerator, config); + *clauncher, this->LocalGenerator, config, this->GeneratorTarget, nullptr, + this->GeneratorTarget, lang); if (!evaluatedClauncher.empty()) { compilerLauncher = evaluatedClauncher; } diff --git a/Tests/RunCMake/CompilerLauncher/C-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/C-env-Build-stdout.txt index 3313e31..544b65f 100644 --- a/Tests/RunCMake/CompilerLauncher/C-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/C-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=C.* diff --git a/Tests/RunCMake/CompilerLauncher/C-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/C-launch-env-Build-stdout.txt index 3313e31..544b65f 100644 --- a/Tests/RunCMake/CompilerLauncher/C-launch-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/C-launch-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=C.* diff --git a/Tests/RunCMake/CompilerLauncher/CUDA-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/CUDA-env-Build-stdout.txt index 3313e31..a6e8b0a 100644 --- a/Tests/RunCMake/CompilerLauncher/CUDA-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/CUDA-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=CUDA.* diff --git a/Tests/RunCMake/CompilerLauncher/CUDA-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/CUDA-launch-env-Build-stdout.txt index 3313e31..a6e8b0a 100644 --- a/Tests/RunCMake/CompilerLauncher/CUDA-launch-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/CUDA-launch-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=CUDA.* diff --git a/Tests/RunCMake/CompilerLauncher/CXX-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/CXX-env-Build-stdout.txt index 3313e31..082c7b5 100644 --- a/Tests/RunCMake/CompilerLauncher/CXX-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/CXX-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=CXX.* diff --git a/Tests/RunCMake/CompilerLauncher/CXX-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/CXX-launch-env-Build-stdout.txt index 3313e31..082c7b5 100644 --- a/Tests/RunCMake/CompilerLauncher/CXX-launch-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/CXX-launch-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=CXX.* diff --git a/Tests/RunCMake/CompilerLauncher/Fortran-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/Fortran-env-Build-stdout.txt index 3313e31..9f8c754 100644 --- a/Tests/RunCMake/CompilerLauncher/Fortran-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/Fortran-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=Fortran.* diff --git a/Tests/RunCMake/CompilerLauncher/Fortran-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/Fortran-launch-env-Build-stdout.txt index 3313e31..9f8c754 100644 --- a/Tests/RunCMake/CompilerLauncher/Fortran-launch-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/Fortran-launch-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=Fortran.* diff --git a/Tests/RunCMake/CompilerLauncher/HIP-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/HIP-env-Build-stdout.txt index 3313e31..354e317 100644 --- a/Tests/RunCMake/CompilerLauncher/HIP-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/HIP-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=HIP.* diff --git a/Tests/RunCMake/CompilerLauncher/HIP-env-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/HIP-env-launch-Build-stdout.txt deleted file mode 100644 index 3313e31..0000000 --- a/Tests/RunCMake/CompilerLauncher/HIP-env-launch-Build-stdout.txt +++ /dev/null @@ -1 +0,0 @@ -.*-E env USED_LAUNCHER=1.* diff --git a/Tests/RunCMake/CompilerLauncher/HIP-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/HIP-launch-env-Build-stdout.txt new file mode 100644 index 0000000..354e317 --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/HIP-launch-env-Build-stdout.txt @@ -0,0 +1 @@ +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=HIP.* diff --git a/Tests/RunCMake/CompilerLauncher/ISPC-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/ISPC-env-Build-stdout.txt index 3313e31..6b71839 100644 --- a/Tests/RunCMake/CompilerLauncher/ISPC-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/ISPC-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=ISPC.* diff --git a/Tests/RunCMake/CompilerLauncher/ISPC-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/ISPC-launch-env-Build-stdout.txt index 3313e31..6b71839 100644 --- a/Tests/RunCMake/CompilerLauncher/ISPC-launch-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/ISPC-launch-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=ISPC.* diff --git a/Tests/RunCMake/CompilerLauncher/OBJC-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJC-env-Build-stdout.txt index 3313e31..d2efd3d 100644 --- a/Tests/RunCMake/CompilerLauncher/OBJC-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/OBJC-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJC.* diff --git a/Tests/RunCMake/CompilerLauncher/OBJC-env-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJC-env-launch-Build-stdout.txt deleted file mode 100644 index 3313e31..0000000 --- a/Tests/RunCMake/CompilerLauncher/OBJC-env-launch-Build-stdout.txt +++ /dev/null @@ -1 +0,0 @@ -.*-E env USED_LAUNCHER=1.* diff --git a/Tests/RunCMake/CompilerLauncher/OBJC-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJC-launch-env-Build-stdout.txt new file mode 100644 index 0000000..d2efd3d --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/OBJC-launch-env-Build-stdout.txt @@ -0,0 +1 @@ +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJC.* diff --git a/Tests/RunCMake/CompilerLauncher/OBJCXX-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJCXX-env-Build-stdout.txt index 3313e31..0082ab2 100644 --- a/Tests/RunCMake/CompilerLauncher/OBJCXX-env-Build-stdout.txt +++ b/Tests/RunCMake/CompilerLauncher/OBJCXX-env-Build-stdout.txt @@ -1 +1 @@ -.*-E env USED_LAUNCHER=1.* +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJCXX.* diff --git a/Tests/RunCMake/CompilerLauncher/OBJCXX-env-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJCXX-env-launch-Build-stdout.txt deleted file mode 100644 index 3313e31..0000000 --- a/Tests/RunCMake/CompilerLauncher/OBJCXX-env-launch-Build-stdout.txt +++ /dev/null @@ -1 +0,0 @@ -.*-E env USED_LAUNCHER=1.* diff --git a/Tests/RunCMake/CompilerLauncher/OBJCXX-launch-env-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/OBJCXX-launch-env-Build-stdout.txt new file mode 100644 index 0000000..0082ab2 --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/OBJCXX-launch-env-Build-stdout.txt @@ -0,0 +1 @@ +.*-E env USED_LAUNCHER=1 TARGET_NAME=main LANGUAGE=OBJCXX.* diff --git a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake index e6a2605..b051a19 100644 --- a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake +++ b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake @@ -18,7 +18,7 @@ endfunction() function(run_compiler_launcher_env lang) string(REGEX REPLACE "-.*" "" core_lang "${lang}") # 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}) unset(ENV{CMAKE_${core_lang}_COMPILER_LAUNCHER}) endfunction() |