summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Ninja/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-12-07 19:43:25 (GMT)
committerBrad King <brad.king@kitware.com>2020-12-08 19:51:36 (GMT)
commit10809357322789889670d5829bb96fcc545870af (patch)
treeeff12be158470f97ca78327f683e72ac4cdb92b4 /Tests/RunCMake/Ninja/RunCMakeTest.cmake
parent287c59107997f33ba97e1637206a468ac0470033 (diff)
downloadCMake-10809357322789889670d5829bb96fcc545870af.zip
CMake-10809357322789889670d5829bb96fcc545870af.tar.gz
CMake-10809357322789889670d5829bb96fcc545870af.tar.bz2
AutoGen: Account for CMP0116 in the depfile
Fixes: #21467
Diffstat (limited to 'Tests/RunCMake/Ninja/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/Ninja/RunCMakeTest.cmake13
1 files changed, 11 insertions, 2 deletions
diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
index e6f86a1..b91ab00 100644
--- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
@@ -338,8 +338,17 @@ function(run_Qt5AutoMocDeps)
# Build and assert that AUTOMOC was not run for app_with_qt.
run_ninja("${RunCMake_TEST_BINARY_DIR}")
if(ninja_stdout MATCHES "Automatic MOC for target app_with_qt")
- message(FATAL_ERROR
- "AUTOMOC should not have executed for 'app_with_qt' target:\nstdout:\n${ninja_stdout}")
+ message(FATAL_ERROR
+ "AUTOMOC should not have executed for 'app_with_qt' target:\nstdout:\n${ninja_stdout}")
+ endif()
+ # Assert that the subdir executables were not rebuilt.
+ if(ninja_stdout MATCHES "Automatic MOC for target sub_exe_1")
+ message(FATAL_ERROR
+ "AUTOMOC should not have executed for 'sub_exe_1' target:\nstdout:\n${ninja_stdout}")
+ endif()
+ if(ninja_stdout MATCHES "Automatic MOC for target sub_exe_2")
+ message(FATAL_ERROR
+ "AUTOMOC should not have executed for 'sub_exe_2' target:\nstdout:\n${ninja_stdout}")
endif()
endif()
endfunction()