Commit 51101fa9 authored by Jason Juang's avatar Jason Juang Committed by Davis E. King

prevent C++ compilation flags leaking to CUDA (#1216)

* prevent C++ compilation flags leaking to CUDA

* disable compilation flags leak fix for old cmake on windows

* disable compilation flags leak fix for cmake older than 3.3
parent fe1c2873
......@@ -769,7 +769,15 @@ if (NOT TARGET dlib)
if (TARGET dlib)
enable_cpp11_for_target(dlib)
target_compile_options(dlib PUBLIC ${active_compile_opts})
if(MSVC AND CMAKE_VERSION VERSION_LESS 3.11)
target_compile_options(dlib PUBLIC ${active_compile_opts})
else()
if(CMAKE_VERSION VERSION_LESS 3.3)
target_compile_options(dlib PUBLIC ${active_compile_opts})
else()
target_compile_options(dlib PUBLIC $<$<COMPILE_LANGUAGE:CXX>:${active_compile_opts}>)
endif()
endif()
endif()
# Install the library
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment