From 3112f61890294cbbdd9464eeb236e72e8a2187b1 Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Tue, 12 Jan 2021 09:48:02 +0100 Subject: [PATCH] Configure RESINSIGHT_USE_ODB_API in root CMakeLists.txt --- ApplicationExeCode/CMakeLists.txt | 2 ++ ApplicationLibCode/CMakeLists.txt | 17 +++-------------- CMakeLists.txt | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/ApplicationExeCode/CMakeLists.txt b/ApplicationExeCode/CMakeLists.txt index 010ec258d9..38651bdabe 100644 --- a/ApplicationExeCode/CMakeLists.txt +++ b/ApplicationExeCode/CMakeLists.txt @@ -271,6 +271,8 @@ if(RESINSIGHT_ENABLE_GRPC) endif() if(RESINSIGHT_USE_ODB_API) + add_definitions(-DUSE_ODB_API) + list(APPEND LINK_LIBRARIES RigGeoMechDataModel) list(APPEND LINK_LIBRARIES RifOdbReader) endif() diff --git a/ApplicationLibCode/CMakeLists.txt b/ApplicationLibCode/CMakeLists.txt index 00feb7fc0d..8fcbb0f38b 100644 --- a/ApplicationLibCode/CMakeLists.txt +++ b/ApplicationLibCode/CMakeLists.txt @@ -210,26 +210,15 @@ set(RI_LIBRARIES ResultStatisticsCache Commands) # # Odb api # -set(RESINSIGHT_ODB_API_DIR - "" - CACHE - PATH - "Optional path to the ABAQUS ODB API from Simulia. Needed for support of geomechanical models" -) -if(NOT ${RESINSIGHT_ODB_API_DIR} EQUAL "") - add_definitions(-DUSE_ODB_API) +if(RESINSIGHT_USE_ODB_API) add_subdirectory(GeoMech/OdbReader) - set(RESINSIGHT_USE_ODB_API 1) - message(STATUS "Using ODB-Api from : ${RESINSIGHT_ODB_API_DIR}") + add_definitions(-DUSE_ODB_API) + list(APPEND RI_LIBRARIES RifOdbReader) endif() add_subdirectory(GeoMech/GeoMechDataModel) list(APPEND RI_LIBRARIES RigGeoMechDataModel) -if(RESINSIGHT_USE_ODB_API) - list(APPEND RI_LIBRARIES RifOdbReader) -endif() - # # HDF5 # diff --git a/CMakeLists.txt b/CMakeLists.txt index 760aaf0630..2337d5f2cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,6 +69,22 @@ if (RESINSIGHT_USE_OPENMP) endif() endif() +################################################################################ +# ABAQUS ODB +################################################################################ +set(RESINSIGHT_ODB_API_DIR + "" + CACHE + PATH + "Optional path to the ABAQUS ODB API from Simulia. Needed for support of geomechanical models" +) +if(NOT ${RESINSIGHT_ODB_API_DIR} EQUAL "") + add_definitions(-DUSE_ODB_API) + set(RESINSIGHT_USE_ODB_API 1) + message(STATUS "Using ODB-Api from : ${RESINSIGHT_ODB_API_DIR}") +endif() + + ################################################################################ # Version number