@@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.20)
33# modified for GitHub and C++11 by Trevor James Smith of Ouranos in Montreal
44# modified for lpsolve support by Maxim Krassovski of DFO
55
6+ # Set the C++ standard to C++11
67set (CMAKE_CXX_STANDARD 11)
78set (CMAKE_CXX_STANDARD_REQUIRED ON )
89
@@ -41,12 +42,16 @@ if(PYTHON)
4142 pybind11_add_module(libraven MODULE src/py/libraven.cpp)
4243 include_directories ("src" )
4344 target_compile_features (libraven PUBLIC cxx_std_11)
45+ # Mute deprecated warnings
46+ target_compile_options (libraven PRIVATE -Wno-deprecated)
4447endif ()
4548
4649# creates a shared library - file extension is OS dependent (Linux: .so, Windows: .dll)
4750if (COMPILE_LIB)
4851 add_library (ravenbmi SHARED ${SOURCE} )
4952 target_compile_definitions (ravenbmi PUBLIC BMI_LIBRARY)
53+ # Mute deprecated warnings
54+ target_compile_options (ravenbmi PRIVATE -Wno-deprecated)
5055endif ()
5156
5257# creates an executable - file extension is OS dependent (Linux: none, Windows: .exe)
@@ -56,6 +61,8 @@ if(COMPILE_EXE)
5661 ${HEADER}
5762 )
5863 set_target_properties (Raven PROPERTIES LINKER_LANGUAGE CXX)
64+ # Mute deprecated warnings
65+ target_compile_options (Raven PRIVATE -Wno-deprecated)
5966 if (LPSOLVE)
6067 target_link_directories (Raven PRIVATE lib/lp_solve) # where liblpsolve55.so is located
6168 target_link_libraries (Raven lpsolve55)
0 commit comments