diff --git a/bindings/fortran/CMakeLists.txt b/bindings/fortran/CMakeLists.txt index 05bec7a..f70d2fd 100644 --- a/bindings/fortran/CMakeLists.txt +++ b/bindings/fortran/CMakeLists.txt @@ -13,6 +13,7 @@ else() if(${CMAKE_Fortran_COMPILER} MATCHES "gfortran") message(STATUS "Generating fortran interface for gfortran naming scheme.") add_definitions(-DGFORTRAN) + set(CMAKE_Fortran_FLAGS ${CMAKE_Fortran_FLAGS} "-Wno-deprecated-declarations") elseif(${CMAKE_Fortran_COMPILER} MATCHES "g77") message(STATUS "Generating fortran interface for g77 naming scheme.") add_definitions(-DG77) @@ -31,6 +32,10 @@ else() endif() endif() + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") + set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "-Wno-deprecated-declarations") + endif() + add_library(${TIXI_LIB_NAME}-f90 STATIC ${TIXI_F_SRC} ${TIXI_F_HDR}) target_link_libraries(${TIXI_LIB_NAME}-f90 ${TIXI_LIB_NAME}) set_target_properties(${TIXI_LIB_NAME}-f90 PROPERTIES VERSION ${TIXI_VERSION})