diff --git a/CMakeLists.txt b/CMakeLists.txt index 08dae53b6abe21e9aaa5341860a308b5c1292b83..17e2f2c9ee0a4923d2f3bdaa7d1776e3de8d155c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,9 +25,7 @@ INCLUDE(scripts/cmake/FindIncludeHeader.cmake) INCLUDE(scripts/cmake/Functions.cmake) INCLUDE(scripts/cmake/CMakeSetup.cmake) INCLUDE(scripts/cmake/CompilerSetup.cmake) -IF(NOT OGS_NO_EXTERNAL_LIBS) - INCLUDE(scripts/cmake/Find.cmake) -ENDIF() # NOT OGS_NO_EXTERNAL_LIBS +INCLUDE(scripts/cmake/Find.cmake) INCLUDE(scripts/cmake/SubmoduleSetup.cmake) INCLUDE(scripts/cmake/ProjectSetup.cmake) INCLUDE(scripts/cmake/DocumentationSetup.cmake) diff --git a/scripts/cmake/Find.cmake b/scripts/cmake/Find.cmake index fdff334950dbfd024ed2971aaedd3ca9c096e14f..c23fed3615f1ccd106bdb46eccef63d41532677a 100644 --- a/scripts/cmake/Find.cmake +++ b/scripts/cmake/Find.cmake @@ -42,10 +42,26 @@ IF(WIN32 AND OGS_PACKAGING) MESSAGE(FATAL_ERROR "Dumpbin was not found but is required for packaging!") ENDIF() ENDIF() + +######################## +### Find other stuff ### +######################## + +# Check if on Jenkins +IF(NOT $ENV{JENKINS_URL} STREQUAL "") + SET(JENKINS_URL $ENV{JENKINS_URL}) + SET(JENKINS_JOB_NAME $ENV{JOB_NAME}) +ENDIF() + ###################### ### Find libraries ### ###################### +# Do not search for libs if this option is set +IF(OGS_NO_EXTERNAL_LIBS) + RETURN() +ENDIF() # OGS_NO_EXTERNAL_LIBS + # Clang does not have OpenMP support atm, see https://github.com/ufz/ogs/issues/8 IF(NOT COMPILER_IS_CLANG) FIND_PACKAGE(OpenMP) @@ -142,13 +158,3 @@ ENDIF() # Shapelib_FOUND IF(OGS_USE_LIS) FIND_PACKAGE( LIS REQUIRED ) ENDIF() - -######################## -### Find other stuff ### -######################## - -# Check if on Jenkins -IF(NOT $ENV{JENKINS_URL} STREQUAL "") - SET(JENKINS_URL $ENV{JENKINS_URL}) - SET(JENKINS_JOB_NAME $ENV{JOB_NAME}) -ENDIF() \ No newline at end of file