Merge topic 'run-include-what-you-use'
b3475ba5 Makefile: Fix <LANG>_INCLUDE_WHAT_YOU_USE with CTEST_USE_LAUNCHERS
This commit is contained in:
commit
3638641396
@ -761,13 +761,6 @@ cmMakefileTargetGenerator
|
|||||||
source.GetFullPath(), workingDirectory, compileCommand);
|
source.GetFullPath(), workingDirectory, compileCommand);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Expand placeholders in the commands.
|
|
||||||
for(std::vector<std::string>::iterator i = compileCommands.begin();
|
|
||||||
i != compileCommands.end(); ++i)
|
|
||||||
{
|
|
||||||
this->LocalGenerator->ExpandRuleVariables(*i, vars);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Maybe insert an include-what-you-use runner.
|
// Maybe insert an include-what-you-use runner.
|
||||||
if (!compileCommands.empty() && (lang == "C" || lang == "CXX"))
|
if (!compileCommands.empty() && (lang == "C" || lang == "CXX"))
|
||||||
{
|
{
|
||||||
@ -782,6 +775,13 @@ cmMakefileTargetGenerator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Expand placeholders in the commands.
|
||||||
|
for(std::vector<std::string>::iterator i = compileCommands.begin();
|
||||||
|
i != compileCommands.end(); ++i)
|
||||||
|
{
|
||||||
|
this->LocalGenerator->ExpandRuleVariables(*i, vars);
|
||||||
|
}
|
||||||
|
|
||||||
// Change the command working directory to the local build tree.
|
// Change the command working directory to the local build tree.
|
||||||
this->LocalGenerator->CreateCDCommand
|
this->LocalGenerator->CreateCDCommand
|
||||||
(compileCommands,
|
(compileCommands,
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
Warning: include-what-you-use reported diagnostics:
|
||||||
|
should add these lines:
|
||||||
|
*
|
||||||
|
#include <\.\.\.>
|
3
Tests/RunCMake/IncludeWhatYouUse/C-launch.cmake
Normal file
3
Tests/RunCMake/IncludeWhatYouUse/C-launch.cmake
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
set(CTEST_USE_LAUNCHERS 1)
|
||||||
|
include(CTestUseLaunchers)
|
||||||
|
include(C.cmake)
|
@ -0,0 +1,4 @@
|
|||||||
|
Warning: include-what-you-use reported diagnostics:
|
||||||
|
should add these lines:
|
||||||
|
*
|
||||||
|
#include <\.\.\.>
|
3
Tests/RunCMake/IncludeWhatYouUse/CXX-launch.cmake
Normal file
3
Tests/RunCMake/IncludeWhatYouUse/CXX-launch.cmake
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
set(CTEST_USE_LAUNCHERS 1)
|
||||||
|
include(CTestUseLaunchers)
|
||||||
|
include(CXX.cmake)
|
@ -16,3 +16,7 @@ endfunction()
|
|||||||
|
|
||||||
run_iwyu(C)
|
run_iwyu(C)
|
||||||
run_iwyu(CXX)
|
run_iwyu(CXX)
|
||||||
|
if (NOT RunCMake_GENERATOR STREQUAL "Watcom WMake")
|
||||||
|
run_iwyu(C-launch)
|
||||||
|
run_iwyu(CXX-launch)
|
||||||
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user