diff --git a/Jenkinsfile b/Jenkinsfile index cb9fe4e1f1a7126602833f8752319cedc02c31c1..3dcbb4abaf06d7c13601401fa93435c02ea59c3d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -92,14 +92,17 @@ pipeline { build { target="tests" } build { target="ctest" } build { target="doc" } + dir('build/docs') { stash(name: 'doxygen') } configure { cmakeOptions = + '-DOGS_USE_CONAN=ON ' + + '-DOGS_CPU_ARCHITECTURE=generic ' + + '-DOGS_USE_PYTHON=ON ' + '-DOGS_BUILD_CLI=OFF ' + '-DOGS_USE_PCH=OFF ' + // see #1992 '-DOGS_BUILD_GUI=ON ' + '-DOGS_BUILD_UTILS=ON ' + '-DOGS_BUILD_TESTS=OFF ' - keepDir = true } build { } } @@ -107,7 +110,6 @@ pipeline { post { always { publishReports { } - dir('build/docs') { stash(name: 'doxygen') } } success { script { @@ -250,11 +252,13 @@ pipeline { // GUI configure { cmakeOptions = + '-DOGS_USE_CONAN=ON ' + + '-DOGS_DOWNLOAD_ADDITIONAL_CONTENT=ON ' + + '-DOGS_USE_PYTHON=ON ' + '-DOGS_BUILD_GUI=ON ' + '-DOGS_BUILD_UTILS=ON ' + '-DOGS_BUILD_TESTS=OFF ' + '-DOGS_BUILD_SWMM=ON ' - keepDir = true } build { } } diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 277be685f315943ca6a3688f23a924327574d148..6562a66ecb2db36e6691ffaeb7dc960e6c6c7e1c 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -46,6 +46,7 @@ target_link_libraries(testrunner NumLib ProcessLib Threads::Threads + ${VTK_LIBRARIES} ) if(OGS_BUILD_PROCESS_LIE) diff --git a/scripts/cmake/ConanSetup.cmake b/scripts/cmake/ConanSetup.cmake index 94f2ca209c48f84f201889ce93042dcde28b4f28..7b4241a44b95040f54801c326d7d33b3bcb8c251 100644 --- a/scripts/cmake/ConanSetup.cmake +++ b/scripts/cmake/ConanSetup.cmake @@ -25,6 +25,8 @@ set(CONAN_REQUIRES set(CONAN_OPTIONS Boost:header_only=True Qt:qtxmlpatterns=True + VTK:minimal=True + VTK:ioxml=True CACHE INTERNAL "" ) @@ -33,11 +35,14 @@ if((UNIX AND NOT APPLE) AND BUILD_SHARED_LIBS) endif() if(OGS_USE_MPI) - set(CONAN_OPTIONS ${CONAN_OPTIONS} VTK:mpi=True) + set(CONAN_OPTIONS ${CONAN_OPTIONS} VTK:mpi_minimal=True) endif() if(OGS_USE_PETSC) set(CONAN_REQUIRES ${CONAN_REQUIRES} petsc/3.8.3@bilke/testing) + if(OGS_CONAN_USE_SYSTEM_OPENMPI) + set(CONAN_OPTIONS ${CONAN_OPTIONS} petsc:skip_install_openmpi=True) + endif() endif() if(OGS_USE_LIS) @@ -50,7 +55,10 @@ if(OGS_BUILD_GUI) libgeotiff/1.4.2@bilke/stable Qt/5.11.0@bilke/stable ) - set(CONAN_OPTIONS ${CONAN_OPTIONS} VTK:qt=True) + set(CONAN_OPTIONS ${CONAN_OPTIONS} + VTK:minimal=False + VTK:qt=True + ) endif() conan_check(VERSION 1.0.0 REQUIRED) @@ -77,6 +85,9 @@ if(MSVC) set(CONAN_IMPORTS ${CONAN_IMPORTS} "bin, *.dll* -> ./bin") set(CONAN_IMPORTS ${CONAN_IMPORTS} "plugins/platforms, *.dll* -> ./bin/platforms") endif() +if(UNIX AND NOT APPLE) + set(CONAN_IMPORTS ${CONAN_IMPORTS} "lib, *.so* -> ./lib") +endif() file(TIMESTAMP ${PROJECT_BINARY_DIR}/conan_install_timestamp.txt file_timestamp "%Y.%m.%d") string(TIMESTAMP timestamp "%Y.%m.%d") @@ -104,3 +115,7 @@ if(NOT ${OGS_CONAN_BUILD} MATCHES "never|always|missing") message(STATUS "Warning: Resetting CMake variable OGS_CONAN_BUILD to its default value of 'missing'") set(OGS_CONAN_BUILD "missing" CACHE INTERNAL "") endif() + +if(OGS_USE_PETSC) + set(PETSC_DIR ${CONAN_PETSC_ROOT} CACHE INTERNAL "") +endif() diff --git a/scripts/cmake/packaging/Pack.cmake b/scripts/cmake/packaging/Pack.cmake index 0742db29b613fa548e04634ac30f9e8ee9013af4..3ef648bf2d41e0433cb2ce141fef26f944b95977 100644 --- a/scripts/cmake/packaging/Pack.cmake +++ b/scripts/cmake/packaging/Pack.cmake @@ -104,11 +104,17 @@ cpack_add_component(ogs_docs if(OGS_USE_CONAN) # Install shared libraries, copied to bin-dir - foreach(PATTERN "*.dll" "*.dylib") + foreach(PATTERN "*.dll" "*.dylib*") file(GLOB MATCHED_FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${PATTERN}) install(FILES ${MATCHED_FILES} DESTINATION bin) endforeach() + # Install shared libraries, copied to lib-dir + foreach(PATTERN "*.so*") + file(GLOB MATCHED_FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${PATTERN}) + install(FILES ${MATCHED_FILES} DESTINATION lib) + endforeach() + # macOS frameworks are directories, exclude header files file(GLOB MATCHED_DIRECTORIES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/*.framework") install(DIRECTORY ${MATCHED_DIRECTORIES} DESTINATION bin diff --git a/scripts/cmake/packaging/PackagingLinux.cmake b/scripts/cmake/packaging/PackagingLinux.cmake index c35013f60f599c81e744b87ff0c9ddb1fae2a6c5..44c11444832ab1cc46830e9938b33d94a3c209a0 100644 --- a/scripts/cmake/packaging/PackagingLinux.cmake +++ b/scripts/cmake/packaging/PackagingLinux.cmake @@ -1,6 +1,9 @@ set(CPACK_GENERATOR TGZ) # Adds the binaries location to the LD_LIBRARY_PATH set(CMAKE_INSTALL_RPATH \$ORIGIN/) +if(OGS_USE_CONAN) + SET(CMAKE_INSTALL_RPATH "$ORIGIN/../lib") +endif() if(MODULE_CMD) message(STATUS "Found module cmd -> writing module file.")