mirror of
https://github.com/OPM/ResInsight.git
synced 2024-12-29 10:21:54 -06:00
GHA: Use precompiled opm-common
* GHA: Use precompiled opm-common * Fix cmake logic
This commit is contained in:
parent
342f191288
commit
c55d46c080
1
.github/workflows/ResInsightWithCache.yml
vendored
1
.github/workflows/ResInsightWithCache.yml
vendored
@ -199,6 +199,7 @@ jobs:
|
|||||||
-D RESINSIGHT_GRPC_PYTHON_EXECUTABLE=${{ steps.python-path.outputs.PYTHON_EXECUTABLE }}
|
-D RESINSIGHT_GRPC_PYTHON_EXECUTABLE=${{ steps.python-path.outputs.PYTHON_EXECUTABLE }}
|
||||||
-D RESINSIGHT_GRPC_DOWNLOAD_PYTHON_MODULE=true
|
-D RESINSIGHT_GRPC_DOWNLOAD_PYTHON_MODULE=true
|
||||||
-D RESINSIGHT_ENABLE_HDF5=false
|
-D RESINSIGHT_ENABLE_HDF5=false
|
||||||
|
-D RESINSIGHT_BUILD_LIBS_FROM_SOURCE=false
|
||||||
-D CMAKE_TOOLCHAIN_FILE=ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake
|
-D CMAKE_TOOLCHAIN_FILE=ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake
|
||||||
-G Ninja
|
-G Ninja
|
||||||
RESULT_VARIABLE result
|
RESULT_VARIABLE result
|
||||||
|
@ -436,22 +436,21 @@ add_subdirectory(ThirdParty/custom-opm-flowdiag-app)
|
|||||||
# Option used to build opm-common from source or use precompiled binaries
|
# Option used to build opm-common from source or use precompiled binaries
|
||||||
option(RESINSIGHT_BUILD_LIBS_FROM_SOURCE "Build opm-common from source" ON)
|
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)
|
||||||
add_subdirectory(ThirdParty/custom-opm-common/custom-opm-parser-tests)
|
add_subdirectory(ThirdParty/custom-opm-common/custom-opm-parser-tests)
|
||||||
list(APPEND OPM_LIBRARIES custom-opm-common)
|
list(APPEND OPM_LIBRARIES custom-opm-common)
|
||||||
set_property(TARGET opm-parser-tests PROPERTY FOLDER "Thirdparty/OPM")
|
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()
|
endif()
|
||||||
|
|
||||||
list(APPEND OPM_LIBRARIES custom-opm-flowdiagnostics custom-opm-flowdiag-app)
|
list(APPEND OPM_LIBRARIES custom-opm-flowdiagnostics custom-opm-flowdiag-app)
|
||||||
|
Loading…
Reference in New Issue
Block a user