summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-01-30 15:23:23 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-01-30 15:23:31 (GMT)
commit1c4825066b782be7773d6e6a4358082df2cc55cb (patch)
treec38587b2162d7b4992d069a3bc60914f5d3d1faf /Tests
parent09cb6c48e27a3696796cfbb89822e468de0e491f (diff)
parent8f82e755f336c66194ce8229575e4651cb7a4c62 (diff)
downloadCMake-1c4825066b782be7773d6e6a4358082df2cc55cb.zip
CMake-1c4825066b782be7773d6e6a4358082df2cc55cb.tar.gz
CMake-1c4825066b782be7773d6e6a4358082df2cc55cb.tar.bz2
Merge topic 'msvc-showIncludes'
8f82e755f3 Ninja: Fix detection of MSVC showIncludes prefix in Italian d6e7e4d4a1 Tests: Extend RunCMake.Ninja ShowIncludes cases to cover more languages 9596305c0b Tests: Generalize RunCMake.Ninja ShowIncludes test infrastructure c6dd4fa21d Tests: Extend RunCMake.Ninja ShowIncludes case with sample path a9d97492fd Ninja: Record showIncludes detection in configure log Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8129
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/Ninja/RunCMakeTest.cmake13
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-English-check.cmake3
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-English-stdout.txt1
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-English.cmake3
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-French-check.cmake3
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-French-stdout.txt1
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-French.cmake3
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-German-check.cmake3
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-German-stdout.txt1
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-German.cmake3
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-Italian-check.cmake3
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-Italian-stdout.txt1
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-Italian.cmake3
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-54936-Chinese-check.cmake (renamed from Tests/RunCMake/Ninja/ShowIncludes-54936-check.cmake)2
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-54936-Chinese-stdout.txt1
-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-54936-stdout.txt1
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-65001-Chinese-check.cmake (renamed from Tests/RunCMake/Ninja/ShowIncludes-65001-check.cmake)2
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-65001-Chinese-stdout.txt1
-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-65001-French-check.cmake3
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-65001-French-stdout.txt1
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-65001-French.cmake3
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-65001-Japanese-check.cmake3
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-65001-Japanese-stdout.txt1
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-65001-Japanese.cmake3
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-65001-stdout.txt1
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-932-Japanese-check.cmake3
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-932-Japanese-stdout.txt1
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-932-Japanese.cmake3
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-cmake.cmake4
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes.cmake2
-rw-r--r--Tests/RunCMake/showIncludes.c83
34 files changed, 146 insertions, 18 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index be6c5b1..a7a8295 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -200,6 +200,9 @@ if(CMAKE_GENERATOR MATCHES "Ninja")
if(WIN32)
add_executable(showIncludes showIncludes.c)
list(APPEND Ninja_ARGS -DshowIncludes=$<TARGET_FILE:showIncludes>)
+ if(CMake_TEST_NO_CODEPAGE_9xx)
+ list(APPEND Ninja_ARGS -DCMake_TEST_NO_CODEPAGE_9xx=1)
+ endif()
endif()
add_RunCMake_test(Ninja)
set(NinjaMultiConfig_ARGS
diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
index b94466c..9214e90 100644
--- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
@@ -46,8 +46,17 @@ 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-437-English -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
+ run_cmake_script(ShowIncludes-437-French -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
+ run_cmake_script(ShowIncludes-437-German -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
+ run_cmake_script(ShowIncludes-437-Italian -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})
+ run_cmake_script(ShowIncludes-65001-French -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
+ run_cmake_script(ShowIncludes-65001-Japanese -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
+ if(NOT CMake_TEST_NO_CODEPAGE_9xx)
+ run_cmake_script(ShowIncludes-932-Japanese -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
+ endif()
unset(maybe_MAKE_PROGRAM)
endif()
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-English-check.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-English-check.cmake
new file mode 100644
index 0000000..9338709
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-English-check.cmake
@@ -0,0 +1,3 @@
+# 'cl /showIncludes' prefix with 'VSLANG=1033' and 'chcp 437'.
+set(expect "Note: including file: ")
+include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes-check.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-English-stdout.txt b/Tests/RunCMake/Ninja/ShowIncludes-437-English-stdout.txt
new file mode 100644
index 0000000..bda7eab
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-English-stdout.txt
@@ -0,0 +1 @@
+-- showIncludes='Note: including file: '
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-English.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-English.cmake
new file mode 100644
index 0000000..194b637
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-English.cmake
@@ -0,0 +1,3 @@
+set(CODEPAGE 437)
+set(VSLANG 1033)
+include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-French-check.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-French-check.cmake
new file mode 100644
index 0000000..64b0498
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-French-check.cmake
@@ -0,0 +1,3 @@
+# 'cl /showIncludes' prefix with 'VSLANG=1036' and 'chcp 437'.
+string(ASCII 82 101 109 97 114 113 117 101 255 58 32 105 110 99 108 117 115 105 111 110 32 100 117 32 102 105 99 104 105 101 114 255 58 32 32 expect)
+include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes-check.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-French-stdout.txt b/Tests/RunCMake/Ninja/ShowIncludes-437-French-stdout.txt
new file mode 100644
index 0000000..1a830f1
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-French-stdout.txt
@@ -0,0 +1 @@
+-- showIncludes='Remarque : inclusion du fichier : '
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-French.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-French.cmake
new file mode 100644
index 0000000..9fe4055
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-French.cmake
@@ -0,0 +1,3 @@
+set(CODEPAGE 437)
+set(VSLANG 1036)
+include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-German-check.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-German-check.cmake
new file mode 100644
index 0000000..c1418e3
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-German-check.cmake
@@ -0,0 +1,3 @@
+# 'cl /showIncludes' prefix with 'VSLANG=1031' and 'chcp 437'.
+set(expect "Hinweis: Einlesen der Datei: ")
+include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes-check.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-German-stdout.txt b/Tests/RunCMake/Ninja/ShowIncludes-437-German-stdout.txt
new file mode 100644
index 0000000..9b9875e
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-German-stdout.txt
@@ -0,0 +1 @@
+-- showIncludes='Hinweis: Einlesen der Datei: '
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-German.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-German.cmake
new file mode 100644
index 0000000..882a23c
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-German.cmake
@@ -0,0 +1,3 @@
+set(CODEPAGE 437)
+set(VSLANG 1031)
+include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-Italian-check.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-Italian-check.cmake
new file mode 100644
index 0000000..014ce7f
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-Italian-check.cmake
@@ -0,0 +1,3 @@
+# 'cl /showIncludes' prefix with 'VSLANG=1040' and 'chcp 437'.
+set(expect "Nota: file incluso ")
+include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes-check.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-Italian-stdout.txt b/Tests/RunCMake/Ninja/ShowIncludes-437-Italian-stdout.txt
new file mode 100644
index 0000000..9dd03a5
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-Italian-stdout.txt
@@ -0,0 +1 @@
+-- showIncludes='Nota: file incluso '
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-Italian.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-Italian.cmake
new file mode 100644
index 0000000..be04271
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-Italian.cmake
@@ -0,0 +1,3 @@
+set(CODEPAGE 437)
+set(VSLANG 1040)
+include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-54936-check.cmake b/Tests/RunCMake/Ninja/ShowIncludes-54936-Chinese-check.cmake
index 40bb68f..c5744b7 100644
--- a/Tests/RunCMake/Ninja/ShowIncludes-54936-check.cmake
+++ b/Tests/RunCMake/Ninja/ShowIncludes-54936-Chinese-check.cmake
@@ -1,3 +1,3 @@
# 'cl /showIncludes' prefix with 'VSLANG=2052' and 'chcp 54936'.
-string(ASCII 215 162 210 226 58 32 176 252 186 172 206 196 188 254 58 expect)
+string(ASCII 215 162 210 226 58 32 176 252 186 172 206 196 188 254 58 32 32 expect)
include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes-check.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-54936-Chinese-stdout.txt b/Tests/RunCMake/Ninja/ShowIncludes-54936-Chinese-stdout.txt
new file mode 100644
index 0000000..b9ac962
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-54936-Chinese-stdout.txt
@@ -0,0 +1 @@
+-- showIncludes='注意: 包含文件: '
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-54936-stdout.txt b/Tests/RunCMake/Ninja/ShowIncludes-54936-stdout.txt
deleted file mode 100644
index 42a2f35..0000000
--- a/Tests/RunCMake/Ninja/ShowIncludes-54936-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
--- showIncludes='注意: 包含文件:'
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-65001-check.cmake b/Tests/RunCMake/Ninja/ShowIncludes-65001-Chinese-check.cmake
index c73b734..6f61d3c 100644
--- a/Tests/RunCMake/Ninja/ShowIncludes-65001-check.cmake
+++ b/Tests/RunCMake/Ninja/ShowIncludes-65001-Chinese-check.cmake
@@ -1,3 +1,3 @@
# 'cl /showIncludes' prefix with 'VSLANG=2052' and 'chcp 65001'.
-string(ASCII 230 179 168 230 132 143 58 32 229 140 133 229 144 171 230 150 135 228 187 182 58 expect)
+string(ASCII 230 179 168 230 132 143 58 32 229 140 133 229 144 171 230 150 135 228 187 182 58 32 32 expect)
include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes-check.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-65001-Chinese-stdout.txt b/Tests/RunCMake/Ninja/ShowIncludes-65001-Chinese-stdout.txt
new file mode 100644
index 0000000..b9ac962
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-65001-Chinese-stdout.txt
@@ -0,0 +1 @@
+-- showIncludes='注意: 包含文件: '
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-65001-French-check.cmake b/Tests/RunCMake/Ninja/ShowIncludes-65001-French-check.cmake
new file mode 100644
index 0000000..133cbe6
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-65001-French-check.cmake
@@ -0,0 +1,3 @@
+# 'cl /showIncludes' prefix with 'VSLANG=1036' and 'chcp 65001'.
+string(ASCII 82 101 109 97 114 113 117 101 194 160 58 32 105 110 99 108 117 115 105 111 110 32 100 117 32 102 105 99 104 105 101 114 194 160 58 32 32 expect)
+include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes-check.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-65001-French-stdout.txt b/Tests/RunCMake/Ninja/ShowIncludes-65001-French-stdout.txt
new file mode 100644
index 0000000..1a830f1
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-65001-French-stdout.txt
@@ -0,0 +1 @@
+-- showIncludes='Remarque : inclusion du fichier : '
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-65001-French.cmake b/Tests/RunCMake/Ninja/ShowIncludes-65001-French.cmake
new file mode 100644
index 0000000..49927f6
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-65001-French.cmake
@@ -0,0 +1,3 @@
+set(CODEPAGE 65001)
+set(VSLANG 1036)
+include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-65001-Japanese-check.cmake b/Tests/RunCMake/Ninja/ShowIncludes-65001-Japanese-check.cmake
new file mode 100644
index 0000000..852bae7
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-65001-Japanese-check.cmake
@@ -0,0 +1,3 @@
+# 'cl /showIncludes' prefix with 'VSLANG=1041' and 'chcp 65001'.
+string(ASCII 227 131 161 227 131 162 58 32 227 130 164 227 131 179 227 130 175 227 131 171 227 131 188 227 131 137 32 227 131 149 227 130 161 227 130 164 227 131 171 58 32 32 expect)
+include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes-check.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-65001-Japanese-stdout.txt b/Tests/RunCMake/Ninja/ShowIncludes-65001-Japanese-stdout.txt
new file mode 100644
index 0000000..4640616
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-65001-Japanese-stdout.txt
@@ -0,0 +1 @@
+-- showIncludes='メモ: インクルード ファイル: '
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-65001-Japanese.cmake b/Tests/RunCMake/Ninja/ShowIncludes-65001-Japanese.cmake
new file mode 100644
index 0000000..59cc84e
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-65001-Japanese.cmake
@@ -0,0 +1,3 @@
+set(CODEPAGE 65001)
+set(VSLANG 1041)
+include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-65001-stdout.txt b/Tests/RunCMake/Ninja/ShowIncludes-65001-stdout.txt
deleted file mode 100644
index 42a2f35..0000000
--- a/Tests/RunCMake/Ninja/ShowIncludes-65001-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
--- showIncludes='注意: 包含文件:'
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-932-Japanese-check.cmake b/Tests/RunCMake/Ninja/ShowIncludes-932-Japanese-check.cmake
new file mode 100644
index 0000000..10fa194
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-932-Japanese-check.cmake
@@ -0,0 +1,3 @@
+# 'cl /showIncludes' prefix with 'VSLANG=1041' and 'chcp 932'.
+string(ASCII 131 129 131 130 58 32 131 67 131 147 131 78 131 139 129 91 131 104 32 131 116 131 64 131 67 131 139 58 32 32 expect)
+include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes-check.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-932-Japanese-stdout.txt b/Tests/RunCMake/Ninja/ShowIncludes-932-Japanese-stdout.txt
new file mode 100644
index 0000000..4640616
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-932-Japanese-stdout.txt
@@ -0,0 +1 @@
+-- showIncludes='メモ: インクルード ファイル: '
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-932-Japanese.cmake b/Tests/RunCMake/Ninja/ShowIncludes-932-Japanese.cmake
new file mode 100644
index 0000000..ed8203c
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-932-Japanese.cmake
@@ -0,0 +1,3 @@
+set(CODEPAGE 932)
+set(VSLANG 1041)
+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)
diff --git a/Tests/RunCMake/showIncludes.c b/Tests/RunCMake/showIncludes.c
index 23b3845..4ea2bcc 100644
--- a/Tests/RunCMake/showIncludes.c
+++ b/Tests/RunCMake/showIncludes.c
@@ -1,33 +1,94 @@
+#ifndef _CRT_SECURE_NO_WARNINGS
+# define _CRT_SECURE_NO_WARNINGS
+#endif
+
#if defined(_MSC_VER) && _MSC_VER >= 1928
# pragma warning(disable : 5105) /* macro expansion warning in windows.h */
#endif
#include <windows.h>
#include <stdio.h>
+#include <stdlib.h>
int main()
{
/* 'cl /showIncludes' encodes output in the console output code page. */
unsigned int cp = GetConsoleOutputCP();
+
+ /* 'cl /showIncludes' prints output in the VS language. */
+ const char* vslang = getenv("VSLANG");
+ if (!vslang) {
+ fprintf(stderr, "VSLANG is not set.\n");
+ return 1;
+ }
+
printf("Console output code page: %u\n", cp);
printf("Console input code page: %u\n", GetConsoleCP());
printf("ANSI code page: %u\n", GetACP());
printf("OEM code page: %u\n", GetOEMCP());
+ printf("VSLANG: %s\n", vslang);
+
+ if (strcmp(vslang, "1031") == 0) {
+ if (cp == 437 || cp == 65001) {
+ printf("Hinweis: Einlesen der Datei: C:\\foo.h\n");
+ return 0;
+ }
+ }
- if (cp == 54936 || cp == 936) {
- /* VSLANG=2052 */
- printf("\xd7\xa2\xd2\xe2: "
- "\xb0\xfc\xba\xac\xce\xc4\xbc\xfe:\n");
- return 0;
+ if (strcmp(vslang, "1033") == 0) {
+ if (cp == 437 || cp == 65001) {
+ printf("Note: including file: C:\\foo.h\n");
+ return 0;
+ }
}
- if (cp == 65001) {
- /* VSLANG=2052 */
- printf("\xe6\xb3\xa8\xe6\x84\x8f: "
- "\xe5\x8c\x85\xe5\x90\xab\xe6\x96\x87\xe4\xbb\xb6:\n");
- return 0;
+ if (strcmp(vslang, "1036") == 0) {
+ if (cp == 437 || cp == 863) {
+ printf("Remarque\xff: inclusion du fichier\xff: C:\\foo.h\n");
+ return 0;
+ }
+ if (cp == 65001) {
+ printf("Remarque\xc2\xa0: inclusion du fichier\xc2\xa0: C:\\foo.h\n");
+ return 0;
+ }
+ }
+
+ if (strcmp(vslang, "1040") == 0) {
+ if (cp == 437 || cp == 65001) {
+ printf("Nota: file incluso C:\\foo.h\n");
+ return 0;
+ }
+ }
+
+ if (strcmp(vslang, "1041") == 0) {
+ if (cp == 932) {
+ printf("\x83\x81\x83\x82: "
+ "\x83\x43\x83\x93\x83\x4e\x83\x8b\x81\x5b\x83\x68 "
+ "\x83\x74\x83\x40\x83\x43\x83\x8b: C:\\foo.h\n");
+ return 0;
+ }
+ if (cp == 65001) {
+ printf("\xe3\x83\xa1\xe3\x83\xa2: \xe3\x82\xa4\xe3\x83\xb3"
+ "\xe3\x82\xaf\xe3\x83\xab\xe3\x83\xbc\xe3\x83\x89 "
+ "\xe3\x83\x95\xe3\x82\xa1\xe3\x82\xa4\xe3\x83\xab: C:\\foo.h\n");
+ return 0;
+ }
+ }
+
+ if (strcmp(vslang, "2052") == 0) {
+ if (cp == 54936 || cp == 936) {
+ printf("\xd7\xa2\xd2\xe2: "
+ "\xb0\xfc\xba\xac\xce\xc4\xbc\xfe: C:\\foo.h\n");
+ return 0;
+ }
+
+ if (cp == 65001) {
+ printf("\xe6\xb3\xa8\xe6\x84\x8f: "
+ "\xe5\x8c\x85\xe5\x90\xab\xe6\x96\x87\xe4\xbb\xb6: C:\\foo.h\n");
+ return 0;
+ }
}
- fprintf(stderr, "No example showIncludes for console's output code page.\n");
+ fprintf(stderr, "No example showIncludes for this code page and VSLANG.\n");
return 1;
}