CMake/MSVC: Mark headers in the libdir as system headers.
This marks the headers in the LIBDIR as system headers and changes the warn to /W0 on msvc versions that support it. This resolves some warnings we would had to completely repress otherwise.
This commit is contained in:
parent
e1d1899e72
commit
161908157d
|
@ -190,6 +190,12 @@ if(NOT EXISTS "${LIBDIR}/")
|
|||
message(FATAL_ERROR "Windows requires pre-compiled libs at: '${LIBDIR}'")
|
||||
endif()
|
||||
|
||||
# Mark libdir as system headers with a lower warn level, to resolve some warnings
|
||||
# that we have very little control over
|
||||
if(MSVC_VERSION GREATER_EQUAL 1914)
|
||||
add_definitions(/experimental:external /external:templates- /external:I "${LIBDIR}" /external:W0)
|
||||
endif()
|
||||
|
||||
# Add each of our libraries to our cmake_prefix_path so find_package() could work
|
||||
file(GLOB children RELATIVE ${LIBDIR} ${LIBDIR}/*)
|
||||
foreach(child ${children})
|
||||
|
|
Loading…
Reference in New Issue