mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-01 04:03:24 +03:00
Two targets whose names differ only in a `.exe` suffix create a conflict when adding target- and file-level dependencies for a custom command. Add CMP0212 to provide compatibility with the old behavior. Issue: #27612
13 lines
395 B
CMake
13 lines
395 B
CMake
include(RunCMake)
|
|
|
|
function(run_cmake_case_cmp0212 case)
|
|
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${case}-build)
|
|
run_cmake(${case})
|
|
set(RunCMake_TEST_NO_CLEAN 1)
|
|
set(RunCMake_TEST_OUTPUT_MERGE 1)
|
|
run_cmake_command(${case}-build ${CMAKE_COMMAND} --build . --target ${ARGN})
|
|
endfunction()
|
|
|
|
run_cmake_case_cmp0212(CMP0212-OLD tgt1)
|
|
run_cmake_case_cmp0212(CMP0212-NEW tgt1 bar)
|