Skip to content

Commit

Permalink
Hide deprecation warning starting from MSVC 17.8
Browse files Browse the repository at this point in the history
  • Loading branch information
magnesj authored Nov 17, 2023
1 parent ffabebf commit b981f5f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ApplicationLibCode/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,20 @@ if(MSVC)

set(BUILD_FLAGS_FOR_MSVC "/W3 /wd4190 /wd4100 /wd4127")

message(STATUS "CMAKE_CXX_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION}")

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(BUILD_FLAGS_FOR_MSVC "${BUILD_FLAGS_FOR_MSVC} /wd4505")
endif()

if(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 19.38)
# https://github.com/OPM/ResInsight/issues/10844
set(BUILD_FLAGS_FOR_MSVC "${BUILD_FLAGS_FOR_MSVC} /wd4996")
endif()

message(STATUS "BUILD_FLAGS_FOR_MSVC ${BUILD_FLAGS_FOR_MSVC}")
set_target_properties(
${PROJECT_NAME} PROPERTIES COMPILE_FLAGS ${BUILD_FLAGS_FOR_MSVC}
Expand Down

0 comments on commit b981f5f

Please sign in to comment.