diff --git a/Applications/Utils/ModelPreparation/CMakeLists.txt b/Applications/Utils/ModelPreparation/CMakeLists.txt index aa1aaf77c6e314d39be18980fe68a72cd1895970..dfd9b2f6f9e8be37496ccda263b9ec4a706cdda1 100644 --- a/Applications/Utils/ModelPreparation/CMakeLists.txt +++ b/Applications/Utils/ModelPreparation/CMakeLists.txt @@ -1,10 +1,12 @@ -set(TOOLS ComputeNodeAreasFromSurfaceMesh convertVtkDataArrayToVtkDataArray - createNeumannBc scaleProperty -) -foreach(tool ${TOOLS}) - ogs_add_executable(${tool} ${tool}.cpp) - target_link_libraries(${tool} GitInfoLib MeshLib tclap) -endforeach() -install(TARGETS ${TOOLS} RUNTIME DESTINATION bin) +if(NOT OGS_USE_MPI) + set(TOOLS ComputeNodeAreasFromSurfaceMesh convertVtkDataArrayToVtkDataArray + createNeumannBc scaleProperty + ) + foreach(tool ${TOOLS}) + ogs_add_executable(${tool} ${tool}.cpp) + target_link_libraries(${tool} GitInfoLib MeshLib tclap) + endforeach() + install(TARGETS ${TOOLS} RUNTIME DESTINATION bin) +endif() add_subdirectory(PartitionMesh) diff --git a/Applications/Utils/ModelPreparation/PartitionMesh/CMakeLists.txt b/Applications/Utils/ModelPreparation/PartitionMesh/CMakeLists.txt index c9283a1a82551465dae0a515c4048f8a858e8984..7d2208f745d0a596b05a6258c28a7e613ee06ca2 100644 --- a/Applications/Utils/ModelPreparation/PartitionMesh/CMakeLists.txt +++ b/Applications/Utils/ModelPreparation/PartitionMesh/CMakeLists.txt @@ -1,14 +1,16 @@ -CPMAddPackage( - NAME metis - GITHUB_REPOSITORY scibuilder/metis - GIT_TAG 982842a5ace9b3da2b2800817eb9e5fd3b42966b - DOWNLOAD_ONLY YES -) -include(${PROJECT_SOURCE_DIR}/scripts/cmake/MetisSetup.cmake) +if(NOT OGS_USE_MPI) + CPMAddPackage( + NAME metis + GITHUB_REPOSITORY scibuilder/metis + GIT_TAG 982842a5ace9b3da2b2800817eb9e5fd3b42966b + DOWNLOAD_ONLY YES + ) + include(${PROJECT_SOURCE_DIR}/scripts/cmake/MetisSetup.cmake) -ogs_add_executable( - partmesh PartitionMesh.cpp Metis.cpp NodeWiseMeshPartitioner.cpp -) -target_link_libraries(partmesh GitInfoLib MeshLib tclap) -add_dependencies(partmesh mpmetis) -install(TARGETS partmesh RUNTIME DESTINATION bin) + ogs_add_executable( + partmesh PartitionMesh.cpp Metis.cpp NodeWiseMeshPartitioner.cpp + ) + target_link_libraries(partmesh GitInfoLib MeshLib tclap) + add_dependencies(partmesh mpmetis) + install(TARGETS partmesh RUNTIME DESTINATION bin) +endif()