mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-19 19:43:23 +08:00
@@ -651,6 +651,12 @@ void cmLocalNinjaGenerator::WriteCustomCommandBuildStatement(
|
||||
gg->WriteBuild(this->GetImplFileStream(fileConfig), build);
|
||||
} else {
|
||||
std::string customStep = cmSystemTools::GetFilenameName(ninjaOutputs[0]);
|
||||
if (this->GlobalGenerator->IsMultiConfig()) {
|
||||
customStep += '-';
|
||||
customStep += fileConfig;
|
||||
customStep += '-';
|
||||
customStep += ccg.GetOutputConfig();
|
||||
}
|
||||
// Hash full path to make unique.
|
||||
customStep += '-';
|
||||
cmCryptoHash hash(cmCryptoHash::AlgoSHA256);
|
||||
|
16
Tests/RunCMake/NinjaMultiConfig/LongCommandLine.cmake
Normal file
16
Tests/RunCMake/NinjaMultiConfig/LongCommandLine.cmake
Normal file
@@ -0,0 +1,16 @@
|
||||
enable_language(C)
|
||||
|
||||
add_executable(generator main.c)
|
||||
|
||||
string(REPEAT "." 5000 very_long)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT gen.txt
|
||||
COMMAND generator "${very_long}" > gen.txt
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
custom
|
||||
ALL
|
||||
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/gen.txt"
|
||||
)
|
@@ -193,9 +193,14 @@ run_cmake_build(SimpleCrossConfigs all-relwithdebinfo-in-release-graph Release a
|
||||
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/PostBuild-build)
|
||||
set(RunCMake_TEST_OPTIONS "-DCMAKE_CROSS_CONFIGS=all")
|
||||
run_cmake_configure(PostBuild)
|
||||
unset(RunCMake_TEST_OPTIONS)
|
||||
run_cmake_build(PostBuild release Release Exe)
|
||||
run_cmake_build(PostBuild debug-in-release-graph Release Exe:Debug)
|
||||
|
||||
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/LongCommandLine-build)
|
||||
run_cmake_configure(LongCommandLine)
|
||||
run_cmake_build(LongCommandLine release Release custom)
|
||||
|
||||
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Framework-build)
|
||||
set(RunCMake_TEST_OPTIONS "-DCMAKE_CROSS_CONFIGS=all")
|
||||
run_cmake_configure(Framework)
|
||||
|
Reference in New Issue
Block a user