diff --git a/CompilerFlags.cmake b/CompilerFlags.cmake index b214a34a6..888416ec9 100644 --- a/CompilerFlags.cmake +++ b/CompilerFlags.cmake @@ -4,10 +4,14 @@ if(NOT MSVC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wall -Wextra -Wno-unused-parameter") set(CMAKE_C_FLAGS - "${CMAKE_C_FLAGS} -Werror-implicit-function-declaration -Werror=incompatible-pointer-types" + "${CMAKE_C_FLAGS} -Werror-implicit-function-declaration -Werror=incompatible-pointer-types" ) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=int-conversion") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Wno-unused-parameter") +endif() + +if(NOT WIN32) + # Even clang's gnu-style driver on windows doesn't accept this argument. set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined") diff --git a/src/xrt/targets/openxr/CMakeLists.txt b/src/xrt/targets/openxr/CMakeLists.txt index 82cd406ab..96d8ca78a 100644 --- a/src/xrt/targets/openxr/CMakeLists.txt +++ b/src/xrt/targets/openxr/CMakeLists.txt @@ -35,7 +35,7 @@ else() ) endif() -if(NOT MSVC) +if(NOT WIN32) # Force the main "negotiate" symbol's inclusion # and use a version script to ensure that's the only one we expose. set_property(