diff options
author | Brad King <brad.king@kitware.com> | 2023-01-26 21:52:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-01-28 11:30:08 (GMT) |
commit | 9596305c0b78b1589703bcd4ace1e764e27dd630 (patch) | |
tree | fd30c158237bcdf03fa3ccb7af297f51d905f959 /Tests/RunCMake/Ninja | |
parent | c6dd4fa21d83f1dbbc4489de3a8a7fcd20e45c84 (diff) | |
download | CMake-9596305c0b78b1589703bcd4ace1e764e27dd630.zip CMake-9596305c0b78b1589703bcd4ace1e764e27dd630.tar.gz CMake-9596305c0b78b1589703bcd4ace1e764e27dd630.tar.bz2 |
Tests: Generalize RunCMake.Ninja ShowIncludes test infrastructure
Prepare to add support for more languages.
Diffstat (limited to 'Tests/RunCMake/Ninja')
-rw-r--r-- | Tests/RunCMake/Ninja/RunCMakeTest.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/ShowIncludes-54936-Chinese-check.cmake (renamed from Tests/RunCMake/Ninja/ShowIncludes-54936-check.cmake) | 0 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/ShowIncludes-54936-Chinese-stdout.txt (renamed from Tests/RunCMake/Ninja/ShowIncludes-65001-stdout.txt) | 0 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/ShowIncludes-54936-Chinese.cmake (renamed from Tests/RunCMake/Ninja/ShowIncludes-54936.cmake) | 1 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/ShowIncludes-65001-Chinese-check.cmake (renamed from Tests/RunCMake/Ninja/ShowIncludes-65001-check.cmake) | 0 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/ShowIncludes-65001-Chinese-stdout.txt (renamed from Tests/RunCMake/Ninja/ShowIncludes-54936-stdout.txt) | 0 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/ShowIncludes-65001-Chinese.cmake (renamed from Tests/RunCMake/Ninja/ShowIncludes-65001.cmake) | 1 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/ShowIncludes-cmake.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/ShowIncludes.cmake | 2 |
9 files changed, 9 insertions, 3 deletions
diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake index b94466c..73a9d15 100644 --- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake +++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake @@ -46,8 +46,8 @@ if(WIN32) if(RunCMake_MAKE_PROGRAM) set(maybe_MAKE_PROGRAM "-DRunCMake_MAKE_PROGRAM=${RunCMake_MAKE_PROGRAM}") endif() - run_cmake_script(ShowIncludes-54936 -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM}) - run_cmake_script(ShowIncludes-65001 -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM}) + run_cmake_script(ShowIncludes-54936-Chinese -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM}) + run_cmake_script(ShowIncludes-65001-Chinese -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM}) unset(maybe_MAKE_PROGRAM) endif() diff --git a/Tests/RunCMake/Ninja/ShowIncludes-54936-check.cmake b/Tests/RunCMake/Ninja/ShowIncludes-54936-Chinese-check.cmake index c5744b7..c5744b7 100644 --- a/Tests/RunCMake/Ninja/ShowIncludes-54936-check.cmake +++ b/Tests/RunCMake/Ninja/ShowIncludes-54936-Chinese-check.cmake diff --git a/Tests/RunCMake/Ninja/ShowIncludes-65001-stdout.txt b/Tests/RunCMake/Ninja/ShowIncludes-54936-Chinese-stdout.txt index b9ac962..b9ac962 100644 --- a/Tests/RunCMake/Ninja/ShowIncludes-65001-stdout.txt +++ b/Tests/RunCMake/Ninja/ShowIncludes-54936-Chinese-stdout.txt diff --git a/Tests/RunCMake/Ninja/ShowIncludes-54936.cmake b/Tests/RunCMake/Ninja/ShowIncludes-54936-Chinese.cmake index 07b4192..77a4014 100644 --- a/Tests/RunCMake/Ninja/ShowIncludes-54936.cmake +++ b/Tests/RunCMake/Ninja/ShowIncludes-54936-Chinese.cmake @@ -1,2 +1,3 @@ set(CODEPAGE 54936) +set(VSLANG 2052) include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes.cmake) diff --git a/Tests/RunCMake/Ninja/ShowIncludes-65001-check.cmake b/Tests/RunCMake/Ninja/ShowIncludes-65001-Chinese-check.cmake index 6f61d3c..6f61d3c 100644 --- a/Tests/RunCMake/Ninja/ShowIncludes-65001-check.cmake +++ b/Tests/RunCMake/Ninja/ShowIncludes-65001-Chinese-check.cmake diff --git a/Tests/RunCMake/Ninja/ShowIncludes-54936-stdout.txt b/Tests/RunCMake/Ninja/ShowIncludes-65001-Chinese-stdout.txt index b9ac962..b9ac962 100644 --- a/Tests/RunCMake/Ninja/ShowIncludes-54936-stdout.txt +++ b/Tests/RunCMake/Ninja/ShowIncludes-65001-Chinese-stdout.txt diff --git a/Tests/RunCMake/Ninja/ShowIncludes-65001.cmake b/Tests/RunCMake/Ninja/ShowIncludes-65001-Chinese.cmake index 0eebd61..0e61c4a 100644 --- a/Tests/RunCMake/Ninja/ShowIncludes-65001.cmake +++ b/Tests/RunCMake/Ninja/ShowIncludes-65001-Chinese.cmake @@ -1,2 +1,3 @@ set(CODEPAGE 65001) +set(VSLANG 2052) include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes.cmake) diff --git a/Tests/RunCMake/Ninja/ShowIncludes-cmake.cmake b/Tests/RunCMake/Ninja/ShowIncludes-cmake.cmake index 672a89f..5ed9970 100644 --- a/Tests/RunCMake/Ninja/ShowIncludes-cmake.cmake +++ b/Tests/RunCMake/Ninja/ShowIncludes-cmake.cmake @@ -1,6 +1,10 @@ # Set the console code page. execute_process(COMMAND cmd /c chcp "${CODEPAGE}") +if(VSLANG) + set(ENV{VSLANG} "${VSLANG}") +endif() + if(RunCMake_MAKE_PROGRAM) set(maybe_MAKE_PROGRAM "-DCMAKE_MAKE_PROGRAM=${RunCMake_MAKE_PROGRAM}") endif() diff --git a/Tests/RunCMake/Ninja/ShowIncludes.cmake b/Tests/RunCMake/Ninja/ShowIncludes.cmake index b9f89fe..a75c9bc 100644 --- a/Tests/RunCMake/Ninja/ShowIncludes.cmake +++ b/Tests/RunCMake/Ninja/ShowIncludes.cmake @@ -15,7 +15,7 @@ endif() # Run cmake in a new Window to isolate its console code page. execute_process(COMMAND cmd /c start /min /wait "" - ${CMAKE_COMMAND} -DCODEPAGE=${CODEPAGE} ${maybe_MAKE_PROGRAM} -P ${CMAKE_CURRENT_LIST_DIR}/ShowIncludes-cmake.cmake) + ${CMAKE_COMMAND} -DCODEPAGE=${CODEPAGE} -DVSLANG=${VSLANG} ${maybe_MAKE_PROGRAM} -P ${CMAKE_CURRENT_LIST_DIR}/ShowIncludes-cmake.cmake) # Print our internal UTF-8 representation of the showIncludes prefix. file(READ "${CMAKE_CURRENT_BINARY_DIR}/showIncludes.txt" showIncludes_txt) |