mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Make it possible to build Octave plugins independent to main build
The building of Octave plugins within main ResInsight build on RHEL8 cause the build to use gcc-12, and gcc-12 is extremely slow when building opm-common. Adjust the CMake configuration so it is possible to build the Octave plugins as an independent build job. The plugin binaries can then be uploaded to an external server. The main ResInsight build can download the binaries and include them in the install package for ResInsight. Use the flag RESINSIGHT_USE_EXTERNAL_OCTAVE_PLUGINS to download external Octave plugin binaries.
This commit is contained in:
@@ -984,15 +984,32 @@ if(RESINSIGHT_ENABLE_GRPC)
|
||||
endif()
|
||||
add_subdirectory(ApplicationExeCode)
|
||||
|
||||
if(OCTAVE_MKOCTFILE)
|
||||
message(STATUS "Adding OctavePlugin library")
|
||||
|
||||
add_subdirectory(OctavePlugin)
|
||||
else(OCTAVE_MKOCTFILE)
|
||||
message(
|
||||
STATUS "Could not find OCTAVE_MKOCTFILE, skipping OctavePlugin library"
|
||||
option(RESINSIGHT_USE_EXTERNAL_OCTAVE_PLUGINS "Use external Octave plugins" OFF)
|
||||
if(RESINSIGHT_USE_EXTERNAL_OCTAVE_PLUGINS)
|
||||
FetchContent_Declare(
|
||||
external-octave_plugins
|
||||
URL https://github.com/CeetronSolutions/resinsight-dependencies/releases/latest/download/OctavePlugins-0.1.1-Linux.tar.gz
|
||||
)
|
||||
endif(OCTAVE_MKOCTFILE)
|
||||
|
||||
FetchContent_Populate(external-octave_plugins)
|
||||
|
||||
file(GLOB FILE_AND_SYMLINKS ${external-octave_plugins_SOURCE_DIR}/*.oct)
|
||||
install(
|
||||
FILES ${FILE_AND_SYMLINKS}
|
||||
DESTINATION ${RESINSIGHT_INSTALL_FOLDER}
|
||||
OPTIONAL
|
||||
)
|
||||
else(RESINSIGHT_USE_EXTERNAL_OCTAVE_PLUGINS)
|
||||
if(OCTAVE_MKOCTFILE)
|
||||
message(STATUS "Adding OctavePlugin library")
|
||||
|
||||
add_subdirectory(Octave/OctavePlugin)
|
||||
else(OCTAVE_MKOCTFILE)
|
||||
message(
|
||||
STATUS "Could not find OCTAVE_MKOCTFILE, skipping OctavePlugin library"
|
||||
)
|
||||
endif(OCTAVE_MKOCTFILE)
|
||||
endif(RESINSIGHT_USE_EXTERNAL_OCTAVE_PLUGINS)
|
||||
|
||||
add_subdirectory(ThirdParty/extract-projectfile-versions)
|
||||
install(TARGETS extract-projectfile-versions
|
||||
|
||||
Reference in New Issue
Block a user