[Bf-blender-cvs] [161908157d6] master: CMake/MSVC: Mark headers in the libdir as system headers.

Ray Molenkamp noreply at git.blender.org
Sat May 25 20:13:08 CEST 2019


Commit: 161908157d67ee8bcfa0c26917cccdc40e0c67ea
Author: Ray Molenkamp
Date:   Sat May 25 12:13:06 2019 -0600
Branches: master
https://developer.blender.org/rB161908157d67ee8bcfa0c26917cccdc40e0c67ea

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.

===================================================================

M	build_files/cmake/platform/platform_win32.cmake

===================================================================

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})



More information about the Bf-blender-cvs mailing list