mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
instrument: don't report target=TARGET_NAME
Remove the erroneous default target name when instrumenting custom commands.
This commit is contained in:
committed by
Brad King
parent
1d274d34b9
commit
85a63143ed
@@ -270,7 +270,7 @@ and contain the following data:
|
||||
|
||||
``target``
|
||||
The CMake target associated with the command. Only included when ``role`` is
|
||||
one of ``compile``, ``link``, ``custom``.
|
||||
``compile`` or ``link``.
|
||||
|
||||
``targetType``
|
||||
The :prop_tgt:`TYPE` of the target. Only included when ``role`` is
|
||||
|
||||
@@ -268,7 +268,9 @@ int cmCTestLaunch::Run()
|
||||
{
|
||||
auto instrumentation = cmInstrumentation(this->Reporter.OptionBuildDir);
|
||||
std::map<std::string, std::string> options;
|
||||
options["target"] = this->Reporter.OptionTargetName;
|
||||
if (this->Reporter.OptionTargetName != "TARGET_NAME") {
|
||||
options["target"] = this->Reporter.OptionTargetName;
|
||||
}
|
||||
options["source"] = this->Reporter.OptionSource;
|
||||
options["language"] = this->Reporter.OptionLanguage;
|
||||
options["targetType"] = this->Reporter.OptionTargetType;
|
||||
|
||||
@@ -49,7 +49,6 @@ function(snippet_has_fields snippet contents)
|
||||
has_key("${snippet}" "${contents}" language)
|
||||
has_key("${snippet}" "${contents}" config)
|
||||
elseif (filename MATCHES "^custom-*")
|
||||
has_key("${snippet}" "${contents}" target)
|
||||
has_key("${snippet}" "${contents}" outputs)
|
||||
has_key("${snippet}" "${contents}" outputSizes)
|
||||
elseif (filename MATCHES "^test-*")
|
||||
|
||||
Reference in New Issue
Block a user