diff options
author | Brad King <brad.king@kitware.com> | 2022-10-27 13:26:24 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-10-27 13:26:34 (GMT) |
commit | 74057c72d656c029b9014029f147872bea3ff3cd (patch) | |
tree | 2d21739752fb5b8ae8d75b26351550b5ef756a67 /Tests/RunCMake/Ninja | |
parent | d0451d1a67a880d1c8ff2f2ebfca47904d723bce (diff) | |
parent | a12050666c5441abc4865acdde9ee583e765d6e6 (diff) | |
download | CMake-74057c72d656c029b9014029f147872bea3ff3cd.zip CMake-74057c72d656c029b9014029f147872bea3ff3cd.tar.gz CMake-74057c72d656c029b9014029f147872bea3ff3cd.tar.bz2 |
Merge topic 'ninja-intl-paths' into release-3.25
a12050666c Tests: Add case for ninja with non-ascii chars
02a04dd9c7 Ninja: Restore support for non-ascii paths on Windows with ninja<=1.10
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7833
Diffstat (limited to 'Tests/RunCMake/Ninja')
-rw-r--r-- | Tests/RunCMake/Ninja/Intl-build-check.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/Intl-common.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/Intl.cmake | 7 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/RunCMakeTest.cmake | 9 |
4 files changed, 22 insertions, 0 deletions
diff --git a/Tests/RunCMake/Ninja/Intl-build-check.cmake b/Tests/RunCMake/Ninja/Intl-build-check.cmake new file mode 100644 index 0000000..77f013c --- /dev/null +++ b/Tests/RunCMake/Ninja/Intl-build-check.cmake @@ -0,0 +1,5 @@ +include(${RunCMake_SOURCE_DIR}/Intl-common.cmake) +set(output "${RunCMake_TEST_BINARY_DIR}/${intl}-output.txt") +if(NOT EXISTS "${output}") + set(RunCMake_TEST_FAILED "Expected output does not exist:\n ${output}") +endif() diff --git a/Tests/RunCMake/Ninja/Intl-common.cmake b/Tests/RunCMake/Ninja/Intl-common.cmake new file mode 100644 index 0000000..7703976 --- /dev/null +++ b/Tests/RunCMake/Ninja/Intl-common.cmake @@ -0,0 +1 @@ +set(intl "intl-ë®") diff --git a/Tests/RunCMake/Ninja/Intl.cmake b/Tests/RunCMake/Ninja/Intl.cmake new file mode 100644 index 0000000..50e4ee4 --- /dev/null +++ b/Tests/RunCMake/Ninja/Intl.cmake @@ -0,0 +1,7 @@ +include(Intl-common.cmake) +set(input "${CMAKE_CURRENT_BINARY_DIR}/${intl}-input.txt") +set(output "${CMAKE_CURRENT_BINARY_DIR}/${intl}-output.txt") +file(WRITE "${input}" "${intl}\n") +add_custom_command(OUTPUT "${output}" + COMMAND ${CMAKE_COMMAND} -E copy "${input}" "${output}") +add_custom_target(drive ALL DEPENDS "${output}") diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake index 9f078e6..44a7ba1 100644 --- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake +++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake @@ -33,6 +33,15 @@ function(run_NinjaToolMissing) endfunction() run_NinjaToolMissing() +function(run_Intl) + run_cmake(Intl) + set(RunCMake_TEST_NO_CLEAN 1) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Intl-build) + set(RunCMake_TEST_OUTPUT_MERGE 1) + run_cmake_command(Intl-build ${CMAKE_COMMAND} --build .) +endfunction() +run_Intl() + function(run_NoWorkToDo) run_cmake(NoWorkToDo) set(RunCMake_TEST_NO_CLEAN 1) |