mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Janitor : Disable deprecated functions for newer Qt5 (#7122)
This commit is contained in:
parent
746385fbce
commit
f2c43af8ea
@ -383,16 +383,25 @@ if(MSVC)
|
||||
# set_target_properties(ResInsight PROPERTIES COMPILE_FLAGS "/W3 /wd4190
|
||||
# /wd4100 /wd4127")
|
||||
|
||||
set_target_properties(
|
||||
ResInsight PROPERTIES COMPILE_FLAGS
|
||||
"/wd4190 /wd4100 /wd4127 /wd4245 /wd4005")
|
||||
set(BUILD_FLAGS_FOR_MSVC "/wd4190 /wd4100 /wd4127 /wd4245 /wd4005")
|
||||
|
||||
if(Qt5Core_VERSION_STRING GREATER_EQUAL 5.10)
|
||||
# Disable warning for deprecated functions in newer versions of Qt
|
||||
# https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4996?view=msvc-160
|
||||
set(BUILD_FLAGS_FOR_MSVC "${BUILD_FLAGS_FOR_MSVC} /wd4996")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_VERSION LESS_EQUAL 19.14)
|
||||
# The following warning is generated over 800 times from a qwt header only
|
||||
# using VS2015 Disabling temporarily warning C4505 'function' : unreferenced
|
||||
# local function has been removed
|
||||
set_target_properties(ResInsight PROPERTIES COMPILE_FLAGS "/wd4505")
|
||||
set(BUILD_FLAGS_FOR_MSVC "${BUILD_FLAGS_FOR_MSVC} /wd4505")
|
||||
endif()
|
||||
|
||||
message(STATUS "BUILD_FLAGS_FOR_MSVC ${BUILD_FLAGS_FOR_MSVC}")
|
||||
set_target_properties(ResInsight PROPERTIES COMPILE_FLAGS
|
||||
${BUILD_FLAGS_FOR_MSVC})
|
||||
|
||||
endif()
|
||||
|
||||
# ##############################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user