diff options
Diffstat (limited to 'Tests/RunCMake/Make')
-rw-r--r-- | Tests/RunCMake/Make/MakefileConflict.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/Make/RunCMakeTest.cmake | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/Make/MakefileConflict.cmake b/Tests/RunCMake/Make/MakefileConflict.cmake new file mode 100644 index 0000000..6a8406f --- /dev/null +++ b/Tests/RunCMake/Make/MakefileConflict.cmake @@ -0,0 +1,5 @@ +add_custom_target(Custom) + +# Write a file that GNU make will prefer over "Makefile" +# if 'cmake --build' does not explicitly specify it. +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/GNUmakefile" "") diff --git a/Tests/RunCMake/Make/RunCMakeTest.cmake b/Tests/RunCMake/Make/RunCMakeTest.cmake index 5562aca..b66e30e 100644 --- a/Tests/RunCMake/Make/RunCMakeTest.cmake +++ b/Tests/RunCMake/Make/RunCMakeTest.cmake @@ -42,6 +42,14 @@ run_VerboseBuild() run_cmake(CustomCommandDepfile-ERROR) run_cmake(IncludeRegexSubdir) +function(run_MakefileConflict) + run_cmake(MakefileConflict) + set(RunCMake_TEST_NO_CLEAN 1) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/MakefileConflict-build) + run_cmake_command(MakefileConflict-build ${CMAKE_COMMAND} --build . --target Custom) +endfunction() +run_MakefileConflict() + function(run_CMP0113 val) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CMP0113-${val}-build) run_cmake(CMP0113-${val}) |