Update opm-common

* Update opm-common
Include fix for tNavigator summary import
* Build opm-common from source
* Remove binary caching of opm-common
The caching is no longer required as a clean build takes minutes. In a previous version the build time was up to an hour on some systems.
This commit is contained in:
Magne Sjaastad authored and GitHub committed 2025-05-14 06:57:25 +02:00
1 parent 752d4efc42
commit a958912378
4 files changed
+11 -58

No files matched your search

@@ -229,7 +229,6 @@ jobs:
-DRESINSIGHT_GRPC_PYTHON_EXECUTABLE=${{ steps.python-path.outputs.PYTHON_EXECUTABLE }} -DRESINSIGHT_GRPC_PYTHON_EXECUTABLE=${{ steps.python-path.outputs.PYTHON_EXECUTABLE }}
-DRESINSIGHT_GRPC_DOWNLOAD_PYTHON_MODULE=true -DRESINSIGHT_GRPC_DOWNLOAD_PYTHON_MODULE=true
-DRESINSIGHT_ENABLE_HDF5=false -DRESINSIGHT_ENABLE_HDF5=false
-DRESINSIGHT_BUILD_LIBS_FROM_SOURCE=false
-DCMAKE_TOOLCHAIN_FILE=ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_TOOLCHAIN_FILE=ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake
-G Ninja -G Ninja
-15
View File
@@ -173,21 +173,6 @@ endif()
# #
list(APPEND RI_PRIVATE_INCLUDES ${RESINSIGHT_OPENVDS_API_DIR}/include) list(APPEND RI_PRIVATE_INCLUDES ${RESINSIGHT_OPENVDS_API_DIR}/include)
#
# Configure include directories if opm-common.lib is downloaded and linked
# without building from source
#
if(NOT RESINSIGHT_BUILD_LIBS_FROM_SOURCE)
list(APPEND RI_PUBLIC_INCLUDES
${CMAKE_CURRENT_SOURCE_DIR}/../ThirdParty/custom-opm-common/opm-common
)
list(
APPEND
RI_PRIVATE_INCLUDES
${CMAKE_CURRENT_SOURCE_DIR}/../ThirdParty/custom-opm-common/generated-opm-common/include
)
endif()
# #
# HDF5 # HDF5
# #
+10 -41
View File
@@ -514,49 +514,18 @@ endif() # MSVC
add_subdirectory(ThirdParty/custom-opm-flowdiagnostics) add_subdirectory(ThirdParty/custom-opm-flowdiagnostics)
add_subdirectory(ThirdParty/custom-opm-flowdiag-app) add_subdirectory(ThirdParty/custom-opm-flowdiag-app)
# Option used to build opm-common from source or use precompiled binaries # CREATE_OPM_COMMON_KEYWORDS is used to create c++-code for the keywords in
option(RESINSIGHT_BUILD_LIBS_FROM_SOURCE "Build opm-common from source" ON) # opm-common JSON files See description in
mark_as_advanced(RESINSIGHT_BUILD_LIBS_FROM_SOURCE) # ThirdParty/custom-opm-common/CMakeLists.txt When changing this flag, it is
# required to reopen the Visual Studio project
set(CREATE_OPM_COMMON_KEYWORDS OFF)
if((NOT RESINSIGHT_BUILD_LIBS_FROM_SOURCE) AND MSVC) add_subdirectory(ThirdParty/custom-opm-common)
message(STATUS "Starting download of external library opm-common ...") if(NOT CREATE_OPM_COMMON_KEYWORDS)
add_subdirectory(ThirdParty/custom-opm-common/custom-opm-parser-tests)
# See description of URL here list(APPEND OPM_LIBRARIES custom-opm-common)
# https://docs.github.com/en/repositories/releasing-projects-on-github/linking-to-releases set_property(TARGET opm-parser-tests PROPERTY FOLDER "Thirdparty/OPM")
FetchContent_Declare(
ri-dependencies
URL https://github.com/CeetronSolutions/resinsight-dependencies/releases/download/2025.01/custom-opm-common.zip
)
FetchContent_MakeAvailable(ri-dependencies)
add_library(custom-opm-common STATIC IMPORTED)
set_target_properties(
custom-opm-common
PROPERTIES IMPORTED_CONFIGURATIONS "Debug;Release"
IMPORTED_LOCATION_DEBUG
"${ri-dependencies_SOURCE_DIR}/custom-opm-common_debug.lib"
IMPORTED_LOCATION_RELEASE
"${ri-dependencies_SOURCE_DIR}/custom-opm-common.lib"
)
list(APPEND EXTERNAL_LINK_LIBRARIES custom-opm-common)
message(STATUS "... completed download of external library opm-common ")
else()
# CREATE_OPM_COMMON_KEYWORDS is used to create c++-code for the keywords in
# opm-common JSON files See description in
# ThirdParty/custom-opm-common/CMakeLists.txt When changing this flag, it is
# required to reopen the Visual Studio project
set(CREATE_OPM_COMMON_KEYWORDS OFF)
add_subdirectory(ThirdParty/custom-opm-common)
if(NOT CREATE_OPM_COMMON_KEYWORDS)
add_subdirectory(ThirdParty/custom-opm-common/custom-opm-parser-tests)
list(APPEND OPM_LIBRARIES custom-opm-common)
set_property(TARGET opm-parser-tests PROPERTY FOLDER "Thirdparty/OPM")
endif()
endif() endif()
list(APPEND OPM_LIBRARIES custom-opm-flowdiagnostics custom-opm-flowdiag-app) list(APPEND OPM_LIBRARIES custom-opm-flowdiagnostics custom-opm-flowdiag-app)