Merge topic 'cmake-builtin-targets-use-ninja-terminal'
bbffaa0e
Configure some CMake-provided targets with USES_TERMINAL (#14915)
This commit is contained in:
commit
ef6d030c95
|
@ -5,4 +5,6 @@ console-pool
|
||||||
commands learned a new ``USES_TERMINAL`` option to request that
|
commands learned a new ``USES_TERMINAL`` option to request that
|
||||||
the command be given direct access to the terminal if possible.
|
the command be given direct access to the terminal if possible.
|
||||||
The :generator:`Ninja` generator will places such commands in the
|
The :generator:`Ninja` generator will places such commands in the
|
||||||
``console`` pool.
|
``console`` pool. Build targets provided by CMake that are meant
|
||||||
|
for individual interactive use, such as ``install``, are now
|
||||||
|
placed in this pool.
|
||||||
|
|
|
@ -67,6 +67,7 @@ if(NOT _CTEST_TARGETS_ADDED)
|
||||||
foreach(mode Experimental Nightly Continuous NightlyMemoryCheck)
|
foreach(mode Experimental Nightly Continuous NightlyMemoryCheck)
|
||||||
add_custom_target(${mode}
|
add_custom_target(${mode}
|
||||||
${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode}
|
${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode}
|
||||||
|
USES_TERMINAL
|
||||||
)
|
)
|
||||||
set_property(TARGET ${mode} PROPERTY RULE_LAUNCH_CUSTOM "")
|
set_property(TARGET ${mode} PROPERTY RULE_LAUNCH_CUSTOM "")
|
||||||
set_property(TARGET ${mode} PROPERTY FOLDER "CTestDashboardTargets")
|
set_property(TARGET ${mode} PROPERTY FOLDER "CTestDashboardTargets")
|
||||||
|
@ -82,6 +83,7 @@ if(NOT _CTEST_TARGETS_ADDED)
|
||||||
)
|
)
|
||||||
add_custom_target(${mode}${testtype}
|
add_custom_target(${mode}${testtype}
|
||||||
${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode}${testtype}
|
${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode}${testtype}
|
||||||
|
USES_TERMINAL
|
||||||
)
|
)
|
||||||
set_property(TARGET ${mode}${testtype} PROPERTY RULE_LAUNCH_CUSTOM "")
|
set_property(TARGET ${mode}${testtype} PROPERTY RULE_LAUNCH_CUSTOM "")
|
||||||
set_property(TARGET ${mode}${testtype} PROPERTY FOLDER "CTestDashboardTargets")
|
set_property(TARGET ${mode}${testtype} PROPERTY FOLDER "CTestDashboardTargets")
|
||||||
|
@ -94,6 +96,7 @@ if(NOT _CTEST_TARGETS_ADDED)
|
||||||
if(CTEST_TEST_TARGET_ALIAS)
|
if(CTEST_TEST_TARGET_ALIAS)
|
||||||
add_custom_target(${CTEST_TEST_TARGET_ALIAS}
|
add_custom_target(${CTEST_TEST_TARGET_ALIAS}
|
||||||
${CMAKE_CTEST_COMMAND} ${__conf_types}
|
${CMAKE_CTEST_COMMAND} ${__conf_types}
|
||||||
|
USES_TERMINAL
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -2191,7 +2191,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
|
||||||
= this->CreateGlobalTarget(this->GetPackageTargetName(),
|
= this->CreateGlobalTarget(this->GetPackageTargetName(),
|
||||||
"Run CPack packaging tool...",
|
"Run CPack packaging tool...",
|
||||||
&cpackCommandLines, depends,
|
&cpackCommandLines, depends,
|
||||||
workingDir.c_str(), /*uses_terminal*/false);
|
workingDir.c_str(), /*uses_terminal*/true);
|
||||||
}
|
}
|
||||||
// CPack source
|
// CPack source
|
||||||
const char* packageSourceTargetName = this->GetPackageSourceTargetName();
|
const char* packageSourceTargetName = this->GetPackageSourceTargetName();
|
||||||
|
@ -2215,7 +2215,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
|
||||||
= this->CreateGlobalTarget(packageSourceTargetName,
|
= this->CreateGlobalTarget(packageSourceTargetName,
|
||||||
"Run CPack packaging tool for source...",
|
"Run CPack packaging tool for source...",
|
||||||
&cpackCommandLines, depends,
|
&cpackCommandLines, depends,
|
||||||
workingDir.c_str(), /*uses_terminal*/false);
|
workingDir.c_str(), /*uses_terminal*/true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2241,7 +2241,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
|
||||||
(*targets)[this->GetTestTargetName()]
|
(*targets)[this->GetTestTargetName()]
|
||||||
= this->CreateGlobalTarget(this->GetTestTargetName(),
|
= this->CreateGlobalTarget(this->GetTestTargetName(),
|
||||||
"Running tests...", &cpackCommandLines, depends, 0,
|
"Running tests...", &cpackCommandLines, depends, 0,
|
||||||
/*uses_terminal*/false);
|
/*uses_terminal*/true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Edit Cache
|
//Edit Cache
|
||||||
|
@ -2296,7 +2296,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
|
||||||
(*targets)[rebuildCacheTargetName] =
|
(*targets)[rebuildCacheTargetName] =
|
||||||
this->CreateGlobalTarget(
|
this->CreateGlobalTarget(
|
||||||
rebuildCacheTargetName, "Running CMake to regenerate build system...",
|
rebuildCacheTargetName, "Running CMake to regenerate build system...",
|
||||||
&cpackCommandLines, depends, 0, /*uses_terminal*/false);
|
&cpackCommandLines, depends, 0, /*uses_terminal*/true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Install
|
//Install
|
||||||
|
@ -2377,7 +2377,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
|
||||||
(*targets)[this->GetInstallTargetName()] =
|
(*targets)[this->GetInstallTargetName()] =
|
||||||
this->CreateGlobalTarget(
|
this->CreateGlobalTarget(
|
||||||
this->GetInstallTargetName(), "Install the project...",
|
this->GetInstallTargetName(), "Install the project...",
|
||||||
&cpackCommandLines, depends, 0, /*uses_terminal*/false);
|
&cpackCommandLines, depends, 0, /*uses_terminal*/true);
|
||||||
|
|
||||||
// install_local
|
// install_local
|
||||||
if(const char* install_local = this->GetInstallLocalTargetName())
|
if(const char* install_local = this->GetInstallLocalTargetName())
|
||||||
|
@ -2393,7 +2393,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
|
||||||
(*targets)[install_local] =
|
(*targets)[install_local] =
|
||||||
this->CreateGlobalTarget(
|
this->CreateGlobalTarget(
|
||||||
install_local, "Installing only the local directory...",
|
install_local, "Installing only the local directory...",
|
||||||
&cpackCommandLines, depends, 0, /*uses_terminal*/false);
|
&cpackCommandLines, depends, 0, /*uses_terminal*/true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// install_strip
|
// install_strip
|
||||||
|
@ -2410,7 +2410,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
|
||||||
(*targets)[install_strip] =
|
(*targets)[install_strip] =
|
||||||
this->CreateGlobalTarget(
|
this->CreateGlobalTarget(
|
||||||
install_strip, "Installing the project stripped...",
|
install_strip, "Installing the project stripped...",
|
||||||
&cpackCommandLines, depends, 0, /*uses_terminal*/false);
|
&cpackCommandLines, depends, 0, /*uses_terminal*/true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue