Skip to content
Snippets Groups Projects
Commit 336c22f1 authored by Lars Bilke's avatar Lars Bilke Committed by Lars Bilke
Browse files

[CMake] Generating an eve-module.

parent 22074668
No related branches found
No related tags found
No related merge requests found
...@@ -73,6 +73,9 @@ find_program(YARN yarn) ...@@ -73,6 +73,9 @@ find_program(YARN yarn)
find_program(PIP pip) find_program(PIP pip)
find_package(PythonInterp) find_package(PythonInterp)
find_program(MODULE_CMD modulecmd
PATHS /usr/local/modules/3.2.10-1/Modules/3.2.10/bin)
###################### ######################
### Find libraries ### ### Find libraries ###
###################### ######################
......
...@@ -2,3 +2,19 @@ set(CPACK_GENERATOR TGZ) ...@@ -2,3 +2,19 @@ set(CPACK_GENERATOR TGZ)
# Adds the binaries location to the LD_LIBRARY_PATH # Adds the binaries location to the LD_LIBRARY_PATH
set(CMAKE_INSTALL_RPATH \$ORIGIN/) set(CMAKE_INSTALL_RPATH \$ORIGIN/)
if(MODULE_CMD)
message(STATUS "Found module cmd -> writing module file.")
execute_process(COMMAND ${MODULE_CMD} bash list --terse
ERROR_VARIABLE MODULE_LIST_OUTPUT
)
string(REPLACE "\n" ";" MODULE_LIST_OUTPUT ${MODULE_LIST_OUTPUT})
foreach(line ${MODULE_LIST_OUTPUT})
if(NOT line STREQUAL "Currently Loaded Modulefiles:")
set(MODULE_LOAD_STRING "${MODULE_LOAD_STRING}module load ${line}\n")
endif()
endforeach()
configure_file(${CMAKE_SOURCE_DIR}/scripts/cmake/packaging/module.in
${CMAKE_BINARY_DIR}/module
)
install(FILES ${CMAKE_BINARY_DIR}/module DESTINATION .)
endif()
#%Module1.0
module-whatis OpenGeoSys @OGS_VERSION@
append-path MODULEPATH /global/apps/modulefiles/
@MODULE_LOAD_STRING@
prepend-path PATH @CMAKE_INSTALL_PREFIX@/bin
...@@ -11,6 +11,10 @@ def post = new ogs.post() ...@@ -11,6 +11,10 @@ def post = new ogs.post()
def helper = new ogs.helper() def helper = new ogs.helper()
stage('Configure (envinf1)') { stage('Configure (envinf1)') {
if (helper.isOriginMaster(this)) {
defaultCMakeOptions +=
' -DCMAKE_INSTALL_PREFIX=/global/apps/ogs/head/default'
}
configure.linux(cmakeOptions: defaultCMakeOptions, env: 'envinf1/cli.sh', script: this) configure.linux(cmakeOptions: defaultCMakeOptions, env: 'envinf1/cli.sh', script: this)
configure.linux(cmakeOptions: defaultCMakeOptions + '-DOGS_USE_PETSC=ON', configure.linux(cmakeOptions: defaultCMakeOptions + '-DOGS_USE_PETSC=ON',
dir: 'build-petsc', env: 'envinf1/petsc.sh', script: this) dir: 'build-petsc', env: 'envinf1/petsc.sh', script: this)
...@@ -33,6 +37,10 @@ stage('Test (envinf1)') { ...@@ -33,6 +37,10 @@ stage('Test (envinf1)') {
} }
} }
stage('Deploy (envinf1)') {
build.linux(env: 'envinf1/cli.sh', script: this, target: 'install')
}
stage('Post (envinf1)') { stage('Post (envinf1)') {
post.publishTestReports 'build*/Testing/**/*.xml', 'build*/Tests/testrunner.xml', post.publishTestReports 'build*/Testing/**/*.xml', 'build*/Tests/testrunner.xml',
'ogs/scripts/jenkins/clang-log-parser.rules' 'ogs/scripts/jenkins/clang-log-parser.rules'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment