diff --git a/scripts/cmake/Find.cmake b/scripts/cmake/Find.cmake index 9155b2d85be6a431be1d8511f6adcc11d19220b2..0108ab4a802d0c2ece0c85a3b25cfb4415d12f3d 100644 --- a/scripts/cmake/Find.cmake +++ b/scripts/cmake/Find.cmake @@ -55,6 +55,8 @@ IF(WIN32) ENDIF() ENDIF() +FIND_PROGRAM(CURL_TOOL_PATH curl DOC "The curl-tool") + ###################### ### Find libraries ### ###################### @@ -125,7 +127,7 @@ IF(OGS_USE_PETSC) ##This may cause the compilation broken. IF(FORCE_PETSC_EXECUTABLE_RUNS) SET(PETSC_EXECUTABLE_RUNS YES) - ENDIF() + ENDIF() SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/scripts/cmake/findPETSC") FIND_PACKAGE(PETSc REQUIRED) @@ -133,9 +135,9 @@ IF(OGS_USE_PETSC) include_directories( ${PETSC_INCLUDES} ) - + ADD_DEFINITIONS(-DPETSC_VERSION_NUMBER=PETSC_VERSION_MAJOR*1000+PETSC_VERSION_MINOR*10) - + ENDIF() ## Check MPI package diff --git a/scripts/cmake/ProjectSetup.cmake b/scripts/cmake/ProjectSetup.cmake index 40ae177c695585277b11702cc7277f0eba2ee94b..9cced7ef8120739d778144cc4f5e559a8de1646d 100644 --- a/scripts/cmake/ProjectSetup.cmake +++ b/scripts/cmake/ProjectSetup.cmake @@ -25,4 +25,6 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ) # Check if this project is included in another IF(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) SET(IS_SUBPROJECT ON INTERNAL) -ENDIF() \ No newline at end of file +ENDIF() + +SITE_NAME(HOSTNAME) diff --git a/scripts/cmake/test/Data.cmake b/scripts/cmake/test/Data.cmake index 4b411d95c726de5d6eb21cdba4dad20c6aa9e82c..9378c095305f485a68274dabad00f74ea29d5f03 100644 --- a/scripts/cmake/test/Data.cmake +++ b/scripts/cmake/test/Data.cmake @@ -23,3 +23,21 @@ ADD_CUSTOM_TARGET( -P ${PROJECT_SOURCE_DIR}/scripts/cmake/test/MoveDataToStore.cmake VERBATIM ) + +IF(HOSTNAME STREQUAL "envinf1.eve.ufz.de") + ADD_CUSTOM_TARGET( + sync-data + COMMAND ${CMAKE_COMMAND} -E copy_directory + ${CMAKE_SOURCE_DIR}/../ogs6-data + /data/ogs/ogs6-data + ) + IF(CURL_TOOL_PATH) + ADD_CUSTOM_COMMAND( + TARGET sync-data POST_BUILD + COMMAND ${CURL_TOOL_PATH} --insecure 'https://svn.ufz.de:8443/buildByToken/build?job=Tmp_Trigger&token=ogsbuild&cause=Triggered_by_sync-data_target_on_envinf1' + COMMENT "Triggered sync to opengeosys.org, see https://svn.ufz.de:8443/job/OGS-6/job/SyncExternalData" + ) + ELSE() + MESSAGE(STATUS "curl tool was not found but is required for the sync-data target!") + ENDIF() +ENDIF()