summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CommandLength/CMakeLists.txt5
-rw-r--r--Tests/RunCMake/CXXModules/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CXXModules/examples/file-sets-with-dot/CMakeLists.txt18
-rw-r--r--Tests/RunCMake/CXXModules/examples/file-sets-with-dot/importable.cxx6
-rw-r--r--Tests/RunCMake/CXXModules/examples/file-sets-with-dot/main.cxx6
-rw-r--r--Tests/RunCMake/Ninja/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-17-check.cmake (renamed from Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-check.cmake)2
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-17-stdout.txt (renamed from Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-stdout.txt)0
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-17.cmake (renamed from Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl.cmake)2
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-18-check.cmake3
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-18-stdout.txt1
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-18.cmake3
-rw-r--r--Tests/RunCMake/XcFramework/RunCMakeTest.cmake35
-rw-r--r--Tests/RunCMake/XcodeProject-Device/DeploymentTarget.c4
-rw-r--r--Tests/RunCMake/XcodeProject-Device/RunCMakeTest.cmake46
-rw-r--r--Tests/RunCMake/showIncludes.c12
16 files changed, 95 insertions, 52 deletions
diff --git a/Tests/CommandLength/CMakeLists.txt b/Tests/CommandLength/CMakeLists.txt
index 6836051..8d75172 100644
--- a/Tests/CommandLength/CMakeLists.txt
+++ b/Tests/CommandLength/CMakeLists.txt
@@ -10,7 +10,10 @@ set(msg "${msg} ${msg}")
set(msg "${msg} ${msg}")
set(msg "${msg} ${msg}")
set(msg "${msg} ${msg}")
-foreach(i RANGE 1 1000)
+set(msg "${msg} ${msg}")
+set(msg "${msg} ${msg}")
+set(msg "${msg} ${msg}")
+foreach(i RANGE 1 125)
add_custom_command(TARGET CommandLength POST_BUILD VERBATIM
COMMAND ${CMAKE_COMMAND} -E echo "${i} ${msg}" > log/${i}
)
diff --git a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake
index b996df0..ff78d5a 100644
--- a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake
@@ -184,6 +184,7 @@ run_cxx_module_test(scan-with-pch)
# Tests which use named modules.
if ("named" IN_LIST CMake_TEST_MODULE_COMPILATION)
run_cxx_module_test(simple)
+ run_cxx_module_test(file-sets-with-dot)
run_cxx_module_test(vs-without-flags)
run_cxx_module_test(library library-static -DBUILD_SHARED_LIBS=OFF)
run_cxx_module_test(unity-build)
diff --git a/Tests/RunCMake/CXXModules/examples/file-sets-with-dot/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/file-sets-with-dot/CMakeLists.txt
new file mode 100644
index 0000000..2b16a6a
--- /dev/null
+++ b/Tests/RunCMake/CXXModules/examples/file-sets-with-dot/CMakeLists.txt
@@ -0,0 +1,18 @@
+cmake_minimum_required(VERSION 3.28)
+project(cxx_modules_file_sets_with_dot CXX)
+
+include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake")
+
+add_executable(file_sets_with_dot)
+target_sources(file_sets_with_dot
+ PRIVATE
+ ./main.cxx
+ PRIVATE
+ FILE_SET CXX_MODULES
+ BASE_DIRS
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ FILES
+ ./importable.cxx)
+target_compile_features(file_sets_with_dot PUBLIC cxx_std_20)
+
+add_test(NAME file_sets_with_dot COMMAND file_sets_with_dot)
diff --git a/Tests/RunCMake/CXXModules/examples/file-sets-with-dot/importable.cxx b/Tests/RunCMake/CXXModules/examples/file-sets-with-dot/importable.cxx
new file mode 100644
index 0000000..607680a
--- /dev/null
+++ b/Tests/RunCMake/CXXModules/examples/file-sets-with-dot/importable.cxx
@@ -0,0 +1,6 @@
+export module importable;
+
+export int from_import()
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/CXXModules/examples/file-sets-with-dot/main.cxx b/Tests/RunCMake/CXXModules/examples/file-sets-with-dot/main.cxx
new file mode 100644
index 0000000..feb38d2
--- /dev/null
+++ b/Tests/RunCMake/CXXModules/examples/file-sets-with-dot/main.cxx
@@ -0,0 +1,6 @@
+import importable;
+
+int main(int argc, char* argv[])
+{
+ return from_import();
+}
diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
index 13d9620..2df300c 100644
--- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
@@ -46,7 +46,8 @@ if(WIN32)
if(RunCMake_MAKE_PROGRAM)
set(maybe_MAKE_PROGRAM "-DRunCMake_MAKE_PROGRAM=${RunCMake_MAKE_PROGRAM}")
endif()
- run_cmake_script(ShowIncludes-437-ClangCl -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
+ run_cmake_script(ShowIncludes-437-ClangCl-17 -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
+ run_cmake_script(ShowIncludes-437-ClangCl-18 -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})
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-check.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-17-check.cmake
index 6136463..3ebdb4f 100644
--- a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-check.cmake
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-17-check.cmake
@@ -1,3 +1,3 @@
-# 'clang-cl /showIncludes' prefix.
+# 'clang-cl /showIncludes' prefix for clang-cl <= 17.
set(expect "Note: including file: ")
include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes-check.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-stdout.txt b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-17-stdout.txt
index bda7eab..bda7eab 100644
--- a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-stdout.txt
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-17-stdout.txt
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-17.cmake
index 7eca3d3..9642f06 100644
--- a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl.cmake
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-17.cmake
@@ -1,3 +1,3 @@
set(CODEPAGE 437)
-set(VSLANG "clang-cl") # Special case for test, not a real VS value.
+set(VSLANG "clang-cl-17") # Special case for test, not a real VS value.
include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-18-check.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-18-check.cmake
new file mode 100644
index 0000000..a42af86
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-18-check.cmake
@@ -0,0 +1,3 @@
+# 'clang-cl /showIncludes' prefix for clang-cl >= 18.
+set(expect "Note: including file: ")
+include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes-check.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-18-stdout.txt b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-18-stdout.txt
new file mode 100644
index 0000000..bda7eab
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-18-stdout.txt
@@ -0,0 +1 @@
+-- showIncludes='Note: including file: '
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-18.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-18.cmake
new file mode 100644
index 0000000..997ffb9
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-ClangCl-18.cmake
@@ -0,0 +1,3 @@
+set(CODEPAGE 437)
+set(VSLANG "clang-cl-18") # Special case for test, not a real VS value.
+include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes.cmake)
diff --git a/Tests/RunCMake/XcFramework/RunCMakeTest.cmake b/Tests/RunCMake/XcFramework/RunCMakeTest.cmake
index 9a13892..75adb00 100644
--- a/Tests/RunCMake/XcFramework/RunCMakeTest.cmake
+++ b/Tests/RunCMake/XcFramework/RunCMakeTest.cmake
@@ -14,17 +14,15 @@ function(create_libraries type)
create_library(${type} ios iOS "arm64" iphoneos)
create_library(${type} tvos tvOS "arm64" appletvos)
create_library(${type} watchos watchOS "armv7k\\\\;arm64_32" watchos)
- #FIXME(#25266): Xcode 15.0 does not have visionOS. Improve this condition.
- #if(CMake_TEST_XCODE_VERSION VERSION_GREATER_EQUAL 15)
- # create_library(${type} visionos visionOS "arm64" xros)
- #endif()
+ if(CMake_TEST_XCODE_VERSION VERSION_GREATER_EQUAL 15.2)
+ create_library(${type} visionos visionOS "arm64" xros)
+ endif()
create_library(${type} ios-simulator iOS "${macos_archs_2}" iphonesimulator)
create_library(${type} tvos-simulator tvOS "${macos_archs_2}" appletvsimulator)
create_library(${type} watchos-simulator watchOS "${watch_sim_archs_2}" watchsimulator)
- #FIXME(#25266): Xcode 15.0 does not have visionOS. Improve this condition.
- #if(CMake_TEST_XCODE_VERSION VERSION_GREATER_EQUAL 15)
- # create_library(${type} visionos-simulator visionOS "${macos_archs_2}" xrsimulator)
- #endif()
+ if(CMake_TEST_XCODE_VERSION VERSION_GREATER_EQUAL 15.2)
+ create_library(${type} visionos-simulator visionOS "${macos_archs_2}" xrsimulator)
+ endif()
endfunction()
function(create_xcframework name type platforms)
@@ -62,24 +60,21 @@ function(create_executables name type)
create_executable(${name}-ios ${type} iOS "arm64" iphoneos)
create_executable(${name}-tvos ${type} tvOS "arm64" appletvos)
create_executable(${name}-watchos ${type} watchOS "armv7k\\\\;arm64_32" watchos)
- #FIXME(#25266): Xcode 15.0 does not have visionOS. Improve this condition.
- #if(CMake_TEST_XCODE_VERSION VERSION_GREATER_EQUAL 15)
- # create_executable(${name}-visionos ${type} visionOS "arm64" xros)
- #endif()
+ if(CMake_TEST_XCODE_VERSION VERSION_GREATER_EQUAL 15.2)
+ create_executable(${name}-visionos ${type} visionOS "arm64" xros)
+ endif()
create_executable(${name}-ios-simulator ${type} iOS "${macos_archs_2}" iphonesimulator)
create_executable(${name}-tvos-simulator ${type} tvOS "${macos_archs_2}" appletvsimulator)
create_executable(${name}-watchos-simulator ${type} watchOS "${watch_sim_archs_2}" watchsimulator)
- #FIXME(#25266): Xcode 15.0 does not have visionOS. Improve this condition.
- #if(CMake_TEST_XCODE_VERSION VERSION_GREATER_EQUAL 15)
- # create_executable(${name}-visionos-simulator ${type} visionOS "${macos_archs_2}" xrsimulator)
- #endif()
+ if(CMake_TEST_XCODE_VERSION VERSION_GREATER_EQUAL 15.2)
+ create_executable(${name}-visionos-simulator ${type} visionOS "${macos_archs_2}" xrsimulator)
+ endif()
endfunction()
set(xcframework_platforms macos ios tvos watchos ios-simulator tvos-simulator watchos-simulator)
-#FIXME(#25266): Xcode 15.0 does not have visionOS. Improve this condition.
-#if(CMake_TEST_XCODE_VERSION VERSION_GREATER_EQUAL 15)
-# list(APPEND xcframework_platforms visionos visionos-simulator)
-#endif()
+if(CMake_TEST_XCODE_VERSION VERSION_GREATER_EQUAL 15.2)
+ list(APPEND xcframework_platforms visionos visionos-simulator)
+endif()
if(CMake_TEST_XCODE_VERSION VERSION_GREATER_EQUAL 12)
set(macos_archs_1 "x86_64\\;arm64")
set(macos_archs_2 "x86_64\\\\;arm64")
diff --git a/Tests/RunCMake/XcodeProject-Device/DeploymentTarget.c b/Tests/RunCMake/XcodeProject-Device/DeploymentTarget.c
index c00fce7..91b413a 100644
--- a/Tests/RunCMake/XcodeProject-Device/DeploymentTarget.c
+++ b/Tests/RunCMake/XcodeProject-Device/DeploymentTarget.c
@@ -5,8 +5,8 @@
# if __MAC_OS_X_VERSION_MIN_REQUIRED != __MAC_10_11
# error macOS deployment version mismatch
# endif
-#elif TARGET_OS_XR
-# if __XR_OS_VERSION_MIN_REQUIRED != __XROS_1_0
+#elif TARGET_OS_VISION
+# if __VISION_OS_VERSION_MIN_REQUIRED != __VISIONOS_1_0
# error visionOS deployment version mismatch
# endif
#elif TARGET_OS_IOS
diff --git a/Tests/RunCMake/XcodeProject-Device/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject-Device/RunCMakeTest.cmake
index e4dbb90..b61b7fc 100644
--- a/Tests/RunCMake/XcodeProject-Device/RunCMakeTest.cmake
+++ b/Tests/RunCMake/XcodeProject-Device/RunCMakeTest.cmake
@@ -93,25 +93,24 @@ if(NOT XCODE_VERSION VERSION_LESS 7.1)
unset(RunCMake_TEST_OPTIONS)
endif()
-#FIXME(#25266): Xcode 15.0 does not have visionOS. Improve this condition.
-#if(NOT XCODE_VERSION VERSION_LESS 15)
-# set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesVisionOS-build)
-# set(RunCMake_TEST_NO_CLEAN 1)
-# set(RunCMake_TEST_OPTIONS
-# "-DCMAKE_SYSTEM_NAME=visionOS"
-# "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
-#
-# file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
-# file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-#
-# run_cmake(XcodeBundles)
-# run_cmake_command(XcodeBundles-build-visionOS ${CMAKE_COMMAND} --build .)
-# run_cmake_command(XcodeBundles-install-visionOS ${CMAKE_COMMAND} --build . --target install)
-#
-# unset(RunCMake_TEST_BINARY_DIR)
-# unset(RunCMake_TEST_NO_CLEAN)
-# unset(RunCMake_TEST_OPTIONS)
-#endif()
+if(NOT XCODE_VERSION VERSION_LESS 15.2)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesVisionOS-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_SYSTEM_NAME=visionOS"
+ "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
+
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake(XcodeBundles)
+ run_cmake_command(XcodeBundles-build-visionOS ${CMAKE_COMMAND} --build .)
+ run_cmake_command(XcodeBundles-install-visionOS ${CMAKE_COMMAND} --build . --target install)
+
+ unset(RunCMake_TEST_BINARY_DIR)
+ unset(RunCMake_TEST_NO_CLEAN)
+ unset(RunCMake_TEST_OPTIONS)
+endif()
if(NOT XCODE_VERSION VERSION_LESS 7)
set(RunCMake_TEST_OPTIONS "-DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/osx.cmake")
@@ -262,11 +261,10 @@ if(XCODE_VERSION VERSION_GREATER_EQUAL 8)
deployment_target_test(tvOS appletvsimulator)
deployment_target_test(watchOS watchos)
deployment_target_test(watchOS watchsimulator)
- #FIXME(#25266): Xcode 15.0 does not have visionOS. Improve this condition.
- #if(XCODE_VERSION VERSION_GREATER_EQUAL 15)
- # deployment_target_test(visionOS xros)
- # deployment_target_test(visionOS xrsimulator)
- #endif()
+ if(XCODE_VERSION VERSION_GREATER_EQUAL 15.2)
+ deployment_target_test(visionOS xros)
+ deployment_target_test(visionOS xrsimulator)
+ endif()
endif()
if(XCODE_VERSION VERSION_GREATER_EQUAL 8)
diff --git a/Tests/RunCMake/showIncludes.c b/Tests/RunCMake/showIncludes.c
index 7d467cf..cfc8572 100644
--- a/Tests/RunCMake/showIncludes.c
+++ b/Tests/RunCMake/showIncludes.c
@@ -28,14 +28,22 @@ int main()
printf("OEM code page: %u\n", GetOEMCP());
printf("VSLANG: %s\n", vslang);
- // clang-cl (special case for test, not a real VS value).
- if (strcmp(vslang, "clang-cl") == 0) {
+ // clang-cl <= 17 (special case for test, not a real VS value).
+ if (strcmp(vslang, "clang-cl-17") == 0) {
if (cp == 437 || cp == 65001) {
printf("Note: including file: ./foo.h\n");
return 0;
}
}
+ // clang-cl >= 18 (special case for test, not a real VS value).
+ if (strcmp(vslang, "clang-cl-18") == 0) {
+ if (cp == 437 || cp == 65001) {
+ printf("Note: including file: .\\\\foo.h\n");
+ return 0;
+ }
+ }
+
// msvc-wine (special case for test, not a real VS value).
if (strcmp(vslang, "msvc-wine") == 0) {
if (cp == 437 || cp == 65001) {