Merge pull request #19725 from chennes/cmakeUpdates2025

CMake: Clean up policies
This commit is contained in:
sliptonic
2025-02-24 17:33:10 +01:00
committed by GitHub
11 changed files with 97 additions and 94 deletions

View File

@@ -124,20 +124,6 @@ if (FREECAD_WARN_ERROR)
target_compile_warn_error(Path)
endif()
# Boost >= 1.75.0
if(NOT ${Boost_VERSION} LESS 107500)
set_target_properties(Path PROPERTIES CXX_STANDARD_REQUIRED ON)
set_target_properties(Path PROPERTIES CXX_STANDARD 14)
# Suppress -Wc++17-extensions when using OCCT 7.5 or newer
if (MINGW AND CMAKE_COMPILER_IS_CLANGXX)
unset(_flag_found CACHE)
check_cxx_compiler_flag("-Wno-c++17-extensions" _flag_found)
if (_flag_found)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++17-extensions")
endif()
endif()
endif()
if(FREECAD_USE_PCH)
add_definitions(-D_PreComp_)

View File

@@ -413,8 +413,6 @@ endif ()
add_library(Mesh SHARED ${Core_SRCS} ${WildMagic4_SRCS} ${Mesh_SRCS})
target_link_libraries(Mesh ${Mesh_LIBS})
set_target_properties(Mesh PROPERTIES CXX_STANDARD_REQUIRED ON)
set_target_properties(Mesh PROPERTIES CXX_STANDARD 17)
if (FREECAD_WARN_ERROR)
target_compile_warn_error(Mesh)
endif()