diff options
author | Brad King <brad.king@kitware.com> | 2015-05-21 19:35:45 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-05-22 12:44:46 (GMT) |
commit | b3475ba57bc839125440fe8d21f611198041434e (patch) | |
tree | e11dd2e8a36bcbc4881d372a6ad4ba70e9b05604 /Tests/RunCMake/IncludeWhatYouUse | |
parent | ada5ffce7bad40c56e5d0dd76b9a7b30c96a9e92 (diff) | |
download | CMake-b3475ba57bc839125440fe8d21f611198041434e.zip CMake-b3475ba57bc839125440fe8d21f611198041434e.tar.gz CMake-b3475ba57bc839125440fe8d21f611198041434e.tar.bz2 |
Makefile: Fix <LANG>_INCLUDE_WHAT_YOU_USE with CTEST_USE_LAUNCHERS
The 'ctest --launch' command must be placed before the IWYU launcher on
the compiler command line. Extend the RunCMake.IncludeWhatYouUse test
to cover this case. The Ninja generator already does it correctly.
Diffstat (limited to 'Tests/RunCMake/IncludeWhatYouUse')
5 files changed, 18 insertions, 0 deletions
diff --git a/Tests/RunCMake/IncludeWhatYouUse/C-launch-Build-stdout.txt b/Tests/RunCMake/IncludeWhatYouUse/C-launch-Build-stdout.txt new file mode 100644 index 0000000..cb74677 --- /dev/null +++ b/Tests/RunCMake/IncludeWhatYouUse/C-launch-Build-stdout.txt @@ -0,0 +1,4 @@ +Warning: include-what-you-use reported diagnostics: +should add these lines: +* +#include <\.\.\.> diff --git a/Tests/RunCMake/IncludeWhatYouUse/C-launch.cmake b/Tests/RunCMake/IncludeWhatYouUse/C-launch.cmake new file mode 100644 index 0000000..e66ca20 --- /dev/null +++ b/Tests/RunCMake/IncludeWhatYouUse/C-launch.cmake @@ -0,0 +1,3 @@ +set(CTEST_USE_LAUNCHERS 1) +include(CTestUseLaunchers) +include(C.cmake) diff --git a/Tests/RunCMake/IncludeWhatYouUse/CXX-launch-Build-stdout.txt b/Tests/RunCMake/IncludeWhatYouUse/CXX-launch-Build-stdout.txt new file mode 100644 index 0000000..cb74677 --- /dev/null +++ b/Tests/RunCMake/IncludeWhatYouUse/CXX-launch-Build-stdout.txt @@ -0,0 +1,4 @@ +Warning: include-what-you-use reported diagnostics: +should add these lines: +* +#include <\.\.\.> diff --git a/Tests/RunCMake/IncludeWhatYouUse/CXX-launch.cmake b/Tests/RunCMake/IncludeWhatYouUse/CXX-launch.cmake new file mode 100644 index 0000000..3002c9d --- /dev/null +++ b/Tests/RunCMake/IncludeWhatYouUse/CXX-launch.cmake @@ -0,0 +1,3 @@ +set(CTEST_USE_LAUNCHERS 1) +include(CTestUseLaunchers) +include(CXX.cmake) diff --git a/Tests/RunCMake/IncludeWhatYouUse/RunCMakeTest.cmake b/Tests/RunCMake/IncludeWhatYouUse/RunCMakeTest.cmake index 68c6bd7..8f99eb1 100644 --- a/Tests/RunCMake/IncludeWhatYouUse/RunCMakeTest.cmake +++ b/Tests/RunCMake/IncludeWhatYouUse/RunCMakeTest.cmake @@ -16,3 +16,7 @@ endfunction() run_iwyu(C) run_iwyu(CXX) +if (NOT RunCMake_GENERATOR STREQUAL "Watcom WMake") + run_iwyu(C-launch) + run_iwyu(CXX-launch) +endif() |