Skip to content

Commit c412259

Browse files
committed
build: Windows does not imply MSVC
1 parent 47cd184 commit c412259

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/tests/list/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ if(VulkanHeaders_FOUND)
3535
)
3636
endif()
3737

38-
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
38+
target_link_libraries(runtime_list openxr_loader)
39+
if(MSVC)
3940
target_compile_options(runtime_list PRIVATE /Zc:wchar_t /Zc:forScope /W4 /WX)
40-
target_link_libraries(runtime_list openxr_loader)
4141
endif()
4242

4343
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
4444
target_compile_options(runtime_list PRIVATE -Wall)
45-
target_link_libraries(runtime_list openxr_loader pthread)
45+
target_link_libraries(runtime_list pthread)
4646
endif()
4747

4848
set_target_properties(runtime_list PROPERTIES FOLDER ${TESTS_FOLDER})

src/tests/loader_test/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ if(VulkanHeaders_FOUND)
4343
endif()
4444

4545
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
46-
target_compile_definitions(loader_test PRIVATE _CRT_SECURE_NO_WARNINGS)
47-
target_compile_options(loader_test PRIVATE /Zc:wchar_t /Zc:forScope /W4 /WX)
46+
if(MSVC)
47+
target_compile_definitions(loader_test PRIVATE _CRT_SECURE_NO_WARNINGS)
48+
target_compile_options(loader_test PRIVATE /Zc:wchar_t /Zc:forScope /W4 /WX)
49+
endif()
4850
target_link_libraries(loader_test openxr_loader opengl32 d3d11)
4951
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
5052
target_compile_options(

0 commit comments

Comments
 (0)