From 1758eecefe7c3603a2a71ae47312d246a75de23e Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Wed, 26 May 2021 16:38:51 +0200 Subject: [PATCH] [A/U/MGT] Disable build of non-MPI tools in MPI config. --- .../Utils/MeshGeoTools/CMakeLists.txt | 50 ++++++++++--------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/Applications/Utils/MeshGeoTools/CMakeLists.txt b/Applications/Utils/MeshGeoTools/CMakeLists.txt index 8052a991f9a..2248e9f004c 100644 --- a/Applications/Utils/MeshGeoTools/CMakeLists.txt +++ b/Applications/Utils/MeshGeoTools/CMakeLists.txt @@ -1,28 +1,30 @@ -set(TOOLS - AssignRasterDataToMesh - computeSurfaceNodeIDsInPolygonalRegion - constructMeshesFromGeometry - createIntermediateRasters - identifySubdomains - IntegrateBoreholesIntoMesh - Raster2Mesh -) +if(NOT OGS_USE_MPI) + set(TOOLS + AssignRasterDataToMesh + computeSurfaceNodeIDsInPolygonalRegion + constructMeshesFromGeometry + createIntermediateRasters + identifySubdomains + IntegrateBoreholesIntoMesh + Raster2Mesh + ) -if(OGS_BUILD_GUI) - # Utility requires that GUI is build because it uses Qt-based functionality - # Also requires gmsh at runtime - list(APPEND TOOLS VerticalSliceFromLayers) -endif() + if(OGS_BUILD_GUI) + # Utility requires that GUI is build because it uses Qt-based functionality + # Also requires gmsh at runtime + list(APPEND TOOLS VerticalSliceFromLayers) + endif() -foreach(tool ${TOOLS}) - ogs_add_executable(${tool} ${tool}.cpp) - target_link_libraries( - ${tool} ApplicationsFileIO GitInfoLib MeshLib MeshGeoToolsLib tclap - ) -endforeach() + foreach(tool ${TOOLS}) + ogs_add_executable(${tool} ${tool}.cpp) + target_link_libraries( + ${tool} ApplicationsFileIO GitInfoLib MeshLib MeshGeoToolsLib tclap + ) + endforeach() -if(TARGET VerticalSliceFromLayers) - target_link_libraries(VerticalSliceFromLayers Qt5::Xml Qt5::XmlPatterns) -endif() + if(TARGET VerticalSliceFromLayers) + target_link_libraries(VerticalSliceFromLayers Qt5::Xml Qt5::XmlPatterns) + endif() -install(TARGETS ${TOOLS} RUNTIME DESTINATION bin) + install(TARGETS ${TOOLS} RUNTIME DESTINATION bin) +endif() -- GitLab