GHA: Use precompiled opm-common

* GHA: Use precompiled opm-common
* Fix cmake logic
This commit is contained in:
Magne Sjaastad 2023-05-02 12:32:09 +02:00 committed by GitHub
parent 342f191288
commit c55d46c080
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 12 deletions

View File

@ -199,6 +199,7 @@ jobs:
-D RESINSIGHT_GRPC_PYTHON_EXECUTABLE=${{ steps.python-path.outputs.PYTHON_EXECUTABLE }}
-D RESINSIGHT_GRPC_DOWNLOAD_PYTHON_MODULE=true
-D RESINSIGHT_ENABLE_HDF5=false
-D RESINSIGHT_BUILD_LIBS_FROM_SOURCE=false
-D CMAKE_TOOLCHAIN_FILE=ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake
-G Ninja
RESULT_VARIABLE result

View File

@ -436,22 +436,21 @@ 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)
if(RESINSIGHT_BUILD_LIBS_FROM_SOURCE)
if((NOT RESINSIGHT_BUILD_LIBS_FROM_SOURCE) AND MSVC)
FetchContent_Declare(
ri-dependencies
URL https://github.com/CeetronSolutions/resinsight-dependencies/releases/download/2023.04/custom-opm-common.zip
)
FetchContent_Populate(ri-dependencies)
list(APPEND EXTERNAL_LINK_LIBRARIES
${ri-dependencies_SOURCE_DIR}/custom-opm-common.lib
)
message(STATUS "opm-common: Enabled use of precompiled library")
else()
add_subdirectory(ThirdParty/custom-opm-common)
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")
else()
if(MSVC)
FetchContent_Declare(
ri-dependencies
URL https://github.com/CeetronSolutions/resinsight-dependencies/releases/download/2023.04/custom-opm-common.zip
)
FetchContent_Populate(ri-dependencies)
list(APPEND EXTERNAL_LINK_LIBRARIES
${ri-dependencies_SOURCE_DIR}/custom-opm-common.lib
)
endif()
endif()
list(APPEND OPM_LIBRARIES custom-opm-flowdiagnostics custom-opm-flowdiag-app)