mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-02 04:02:23 +03:00
Ninja: Fix build event commands with $-sign on custom targets
Fixes: #26143
This commit is contained in:
1 parent
45c94ba2ab
commit
c3c14f04f2
2 files changed
+4
-4
No files matched your search
@@ -161,10 +161,6 @@ void cmNinjaUtilityTargetGenerator::WriteUtilBuildStatements(
|
||||
cmSystemTools::ReplaceString(command, "$(ARGS)", "");
|
||||
command = gg->ExpandCFGIntDir(command, config);
|
||||
|
||||
if (command.find('$') != std::string::npos) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::string ccConfig;
|
||||
if (genTarget->Target->IsPerConfig() &&
|
||||
genTarget->GetType() != cmStateEnums::GLOBAL_TARGET) {
|
||||
|
||||
@@ -412,6 +412,10 @@ add_custom_target(do_check_command_line ALL
|
||||
COMMENT "Checking custom target command line escapes ($dollar-signs$)"
|
||||
)
|
||||
add_dependencies(do_check_command_line check_command_line)
|
||||
add_custom_command(TARGET do_check_command_line POST_BUILD VERBATIM
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "POST_BUILD command with $dollar-signs$"
|
||||
COMMENT "Checking custom target POST_BUILD command line escapes ($dollar-signs$)"
|
||||
)
|
||||
|
||||
add_custom_target(pre_check_command_line
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -f ${CMAKE_CURRENT_BINARY_DIR}/check_mark.txt
|
||||
|
||||
Reference in new issue
Block a user