diff options
author | Ray Molenkamp <github@lazydodo.com> | 2019-05-25 21:13:06 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2019-05-25 21:13:06 +0300 |
commit | 161908157d67ee8bcfa0c26917cccdc40e0c67ea (patch) | |
tree | 2082104897003d726fb6fc3969ca47e882bcee3a /build_files/cmake | |
parent | e1d1899e7290a933e23243201ae2267a9efb996f (diff) |
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.
Diffstat (limited to 'build_files/cmake')
-rw-r--r-- | build_files/cmake/platform/platform_win32.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index dce0e73cb37..f52a1f601dc 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -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}) |