diff --git a/.github/workflows/ResInsightWithCache.yml b/.github/workflows/ResInsightWithCache.yml index 5a3d36c052..8473d296db 100644 --- a/.github/workflows/ResInsightWithCache.yml +++ b/.github/workflows/ResInsightWithCache.yml @@ -229,7 +229,6 @@ jobs: -DRESINSIGHT_GRPC_PYTHON_EXECUTABLE=${{ steps.python-path.outputs.PYTHON_EXECUTABLE }} -DRESINSIGHT_GRPC_DOWNLOAD_PYTHON_MODULE=true -DRESINSIGHT_ENABLE_HDF5=false - -DRESINSIGHT_BUILD_LIBS_FROM_SOURCE=false -DCMAKE_TOOLCHAIN_FILE=ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake -G Ninja diff --git a/ApplicationLibCode/CMakeLists.txt b/ApplicationLibCode/CMakeLists.txt index 0004ce92d3..cec9662ecb 100644 --- a/ApplicationLibCode/CMakeLists.txt +++ b/ApplicationLibCode/CMakeLists.txt @@ -173,21 +173,6 @@ endif() # 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 # diff --git a/CMakeLists.txt b/CMakeLists.txt index 1746e15fd0..940330a6c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -514,49 +514,18 @@ endif() # MSVC add_subdirectory(ThirdParty/custom-opm-flowdiagnostics) add_subdirectory(ThirdParty/custom-opm-flowdiag-app) -# Option used to build opm-common from source or use precompiled binaries -option(RESINSIGHT_BUILD_LIBS_FROM_SOURCE "Build opm-common from source" ON) -mark_as_advanced(RESINSIGHT_BUILD_LIBS_FROM_SOURCE) +# 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) -if((NOT RESINSIGHT_BUILD_LIBS_FROM_SOURCE) AND MSVC) +add_subdirectory(ThirdParty/custom-opm-common) - message(STATUS "Starting download of external library opm-common ...") - - # See description of URL here - # https://docs.github.com/en/repositories/releasing-projects-on-github/linking-to-releases - 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() +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() list(APPEND OPM_LIBRARIES custom-opm-flowdiagnostics custom-opm-flowdiag-app) diff --git a/ThirdParty/custom-opm-common/opm-common b/ThirdParty/custom-opm-common/opm-common index ff1a494179..54c8efcd7e 160000 --- a/ThirdParty/custom-opm-common/opm-common +++ b/ThirdParty/custom-opm-common/opm-common @@ -1 +1 @@ -Subproject commit ff1a4941791762be47a1ad1cd924bab8c3610b6e +Subproject commit 54c8efcd7e5a028c962162ea0a476bc3fcb98f29