mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-12 17:19:05 -05:00
FASTBuild: fix inconsistencies in rules application
Fix `ApplyLinkRuleLauncher()` to apply `RULE_LAUNCH_COMPILE`. Remove ApplyCompileRuleLauncher since it's not used and `RULE_LAUNCH_COMPILE` is handled in `AddCompilerLaunchersForLanguages()` Fixes: #27183
This commit is contained in:
@@ -332,7 +332,7 @@ bool cmFastbuildNormalTargetGenerator::DetectBaseLinkerCommand(
|
||||
return true;
|
||||
}
|
||||
|
||||
void cmFastbuildNormalTargetGenerator::ApplyCompileRuleLauncher(
|
||||
void cmFastbuildNormalTargetGenerator::ApplyLinkRuleLauncher(
|
||||
std::string& command)
|
||||
{
|
||||
std::string const val = this->GetLocalGenerator()->GetRuleLauncher(
|
||||
@@ -343,17 +343,6 @@ void cmFastbuildNormalTargetGenerator::ApplyCompileRuleLauncher(
|
||||
}
|
||||
}
|
||||
|
||||
void cmFastbuildNormalTargetGenerator::ApplyLinkRuleLauncher(
|
||||
std::string& command)
|
||||
{
|
||||
std::string const val = this->GetLocalGenerator()->GetRuleLauncher(
|
||||
this->GetGeneratorTarget(), "RULE_LAUNCH_COMPILE", Config);
|
||||
if (cmNonempty(val)) {
|
||||
LogMessage("RULE_LAUNCH_COMPILE: " + val);
|
||||
command = cmStrCat(val, " ", command);
|
||||
}
|
||||
}
|
||||
|
||||
void cmFastbuildNormalTargetGenerator::ApplyLWYUToLinkerCommand(
|
||||
FastbuildLinkerNode& linkerNode)
|
||||
{
|
||||
|
||||
@@ -126,7 +126,6 @@ private:
|
||||
std::string& outLinkerExecutable,
|
||||
std::string& outLinkerArgs);
|
||||
|
||||
void ApplyCompileRuleLauncher(std::string& command);
|
||||
void ApplyLinkRuleLauncher(std::string& command);
|
||||
void ApplyLWYUToLinkerCommand(FastbuildLinkerNode& linkerNode);
|
||||
|
||||
|
||||
@@ -29,6 +29,10 @@ else()
|
||||
string(REPLACE "${CMAKE_END_TEMP_FILE}" "" CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINK_EXECUTABLE}")
|
||||
|
||||
add_executable(main main.c)
|
||||
if(CMAKE_GENERATOR MATCHES "FASTBuild")
|
||||
# FASTBuild needs output to exist.
|
||||
file(TOUCH "${CMAKE_CURRENT_BINARY_DIR}${cfg_dir}/main${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
endif()
|
||||
if (NOT DEFINED CMAKE_LINK_WARNING_AS_ERROR)
|
||||
set_property(TARGET main PROPERTY LINK_WARNING_AS_ERROR ${link_warning_as_error})
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user