1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 10:47:59 +08:00

Tests: Add RunCMake.Make case for conflicting Makefile names

Issue: #21418
This commit is contained in:
Brad King
2020-11-16 11:33:58 -05:00
parent 378c047ae3
commit cfce067b3f
2 changed files with 13 additions and 0 deletions

View File

@@ -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" "")

View File

@@ -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})