mirror of https://github.com/CGAL/cgal
Move the addition of -Wno-deprecated-copy to CGAL_Qt5 setup
That way:
- that will work, even if CGAL CXX_FLAGS are copied (when hte CMake
options `CGAL_DEV_MODE` or `RUNNING_CGAL_AUTO_TEST` are `ON`),
- that will affect all CGAL Qt5 demos at once.
This commit is contained in:
parent
ff4f13e82c
commit
2455affba0
|
|
@ -16,11 +16,6 @@ if(POLICY CMP0071)
|
|||
cmake_policy(SET CMP0071 NEW)
|
||||
endif()
|
||||
|
||||
if( (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") AND
|
||||
(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER "9" OR ${CMAKE_CXX_COMPILER_VERSION} VERSION_EQUAL "9") )
|
||||
set(CMAKE_CXX_FLAGS "-Wno-deprecated-copy ${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
# Include this package's headers first
|
||||
include_directories( BEFORE ./ ./include )
|
||||
|
||||
|
|
|
|||
|
|
@ -118,5 +118,13 @@ function(CGAL_setup_CGAL_Qt5_dependencies target)
|
|||
target_link_libraries( ${target} ${keyword} CGAL::Qt5_moc_and_resources)
|
||||
endif()
|
||||
target_link_libraries( ${target} ${keyword} Qt5::OpenGL Qt5::Svg Qt5::Xml)
|
||||
|
||||
# Remove -Wdeprecated-copy, for g++ >= 9.0, because Qt5, as of
|
||||
# version 5.12, has a lot of [-Wdeprecated-copy] warnings.
|
||||
if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
|
||||
AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9" )
|
||||
target_compile_options( ${target} ${keyword} "-Wno-deprecated-copy" )
|
||||
endif()
|
||||
|
||||
endfunction()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue