Skip to content

Commit

Permalink
CMake: [skip ci] use FILTER of list command only for v3.6 or later
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Dec 12, 2020
1 parent c4b1ec0 commit a9605dc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cMake/FindOpenCasCade.cmake
Expand Up @@ -37,10 +37,12 @@ else(OCE_FOUND) #look for OpenCASCADE
# we first try to find opencascade directly:
if(NOT OCCT_CMAKE_FALLBACK)
find_package(OpenCASCADE CONFIG QUIET)
get_property(flags DIRECTORY PROPERTY COMPILE_DEFINITIONS)
# OCCT 7.5 adds this define that causes hundreds of compiler warnings with Qt5.x, so remove it again
list(FILTER flags EXCLUDE REGEX [[GL_GLEXT_LEGACY]])
set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS ${flags})
if(NOT (CMAKE_VERSION VERSION_LESS 3.6.0))
get_property(flags DIRECTORY PROPERTY COMPILE_DEFINITIONS)
# OCCT 7.5 adds this define that causes hundreds of compiler warnings with Qt5.x, so remove it again
list(FILTER flags EXCLUDE REGEX [[GL_GLEXT_LEGACY]])
set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS ${flags})
endif()
endif(NOT OCCT_CMAKE_FALLBACK)
if(OpenCASCADE_FOUND)
set(OCC_FOUND ${OpenCASCADE_FOUND})
Expand Down

0 comments on commit a9605dc

Please sign in to comment.