Make compiler options work with clang-cl

When propagating the option "-Xclang -fcxx-exceptions" to targets
linking to dlib, the options with quotes are unknown to clang-cl.
Removing the quotes and splitting the arguments into two works fine.
This commit is contained in:
Øystein Myrmo 2022-03-22 14:26:25 +01:00 committed by Davis E. King
parent 04371157f7
commit 04d1180b02

View File

@ -151,7 +151,8 @@ if (MSVC)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.3) if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.3)
# Clang can compile all Dlib's code at Windows platform. Tested with Clang 5 # Clang can compile all Dlib's code at Windows platform. Tested with Clang 5
list(APPEND active_compile_opts "-Xclang -fcxx-exceptions") list(APPEND active_compile_opts -Xclang)
list(APPEND active_compile_opts -fcxx-exceptions)
endif() endif()
endif() endif()