port to MSYS2/clang: suppress 'undefined-var-template' warnings

This commit is contained in:
wmayer
2021-09-22 14:09:07 +02:00
parent 70c5505a75
commit fc83fd1fc8

View File

@@ -372,6 +372,15 @@ SET(Mesh_SRCS
Segment.h
)
# Suppress -Wundefined-var-template
if (MINGW AND CMAKE_COMPILER_IS_CLANGXX)
unset(_flag_found CACHE)
check_cxx_compiler_flag("-Wno-undefined-var-template" _flag_found)
if (_flag_found)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-undefined-var-template")
endif()
endif()
if(FREECAD_USE_PCH)
add_definitions(-D_PreComp_)
GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${Core_SRCS} ${Mesh_SRCS})