summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-05-16 14:39:44 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-05-16 14:40:09 (GMT)
commita59b35ba33123da05adf09878a38f4ab3475a7a1 (patch)
tree4123870caf7727ad4816863e8559ffa037bddaac /Tests
parent0cae3228b8db86cb4ea63b68bd61c47f0a7ca5c6 (diff)
parentfb3c4715cd88bce564e3e64d844cdf4e9bebfb25 (diff)
downloadCMake-a59b35ba33123da05adf09878a38f4ab3475a7a1.zip
CMake-a59b35ba33123da05adf09878a38f4ab3475a7a1.tar.gz
CMake-a59b35ba33123da05adf09878a38f4ab3475a7a1.tar.bz2
Merge topic 'msvc-wine-showIncludes'
fb3c4715cd Ninja: Restore detection of msvc-wine showIncludes prefix Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: huangqinjin <huangqinjin@gmail.com> Merge-request: !8479
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/Ninja/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-check.cmake3
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-stdout.txt1
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC.cmake3
-rw-r--r--Tests/RunCMake/showIncludes.c8
5 files changed, 16 insertions, 0 deletions
diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
index 619e94a..6eb0b1d 100644
--- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
@@ -51,6 +51,7 @@ if(WIN32)
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-437-WineMSVC -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})
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-check.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-check.cmake
new file mode 100644
index 0000000..d4017ab
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-check.cmake
@@ -0,0 +1,3 @@
+# 'msvc-wine -showIncludes' prefix.
+set(expect "Note: including file: ")
+include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes-check.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-stdout.txt b/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-stdout.txt
new file mode 100644
index 0000000..bda7eab
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-stdout.txt
@@ -0,0 +1 @@
+-- showIncludes='Note: including file: '
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC.cmake
new file mode 100644
index 0000000..59d3bf6
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC.cmake
@@ -0,0 +1,3 @@
+set(CODEPAGE 437)
+set(VSLANG "msvc-wine") # Special case for test, not a real VS value.
+include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes.cmake)
diff --git a/Tests/RunCMake/showIncludes.c b/Tests/RunCMake/showIncludes.c
index 5afe04a..7d467cf 100644
--- a/Tests/RunCMake/showIncludes.c
+++ b/Tests/RunCMake/showIncludes.c
@@ -36,6 +36,14 @@ int main()
}
}
+ // msvc-wine (special case for test, not a real VS value).
+ if (strcmp(vslang, "msvc-wine") == 0) {
+ if (cp == 437 || cp == 65001) {
+ printf("Note: including file: /c/foo.h\n");
+ return 0;
+ }
+ }
+
// German.
if (strcmp(vslang, "1031") == 0) {
if (cp == 437 || cp == 65001) {