diff --git a/.gitmodules b/.gitmodules index 458b19e2ccecda398606717523b912bfbf41b334..6333c7e38256c4ac29bb12cb33e6a56f532759e8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "ThirdParty/SwmmInterface"] - path = ThirdParty/SwmmInterface - url = https://github.com/ufz/SwmmInterface.git [submodule "ThirdParty/container-maker"] path = ThirdParty/container-maker url = https://gitlab.opengeosys.org/ogs/container-maker.git diff --git a/Applications/FileIO/SWMM/SWMMInterface.cpp b/Applications/FileIO/SWMM/SWMMInterface.cpp index 1251e6b6f45b0f84127bef24334ae5bdbf88e5e6..21492f6a4c0df1f969f436732f22bf30264de7eb 100644 --- a/Applications/FileIO/SWMM/SWMMInterface.cpp +++ b/Applications/FileIO/SWMM/SWMMInterface.cpp @@ -25,7 +25,7 @@ #include "MeshLib/Mesh.h" #include "MeshLib/Node.h" #include "MeshLib/Properties.h" -#include "ThirdParty/SWMMInterface/swmm5_iface.h" +#include <swmm5_iface.h> namespace FileIO { diff --git a/ThirdParty/CMakeLists.txt b/ThirdParty/CMakeLists.txt index ac50211fe38d29b7d54c20510c18717c25f8112a..bde2cf76361d28657d7c0225e0aa6d3b081430f4 100644 --- a/ThirdParty/CMakeLists.txt +++ b/ThirdParty/CMakeLists.txt @@ -4,11 +4,6 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/VtkFbxConverter/CMakeLists.txt add_subdirectory(VtkFbxConverter) endif() -if(OGS_BUILD_SWMM) - add_subdirectory(SWMMInterface) - list(APPEND DISABLE_WARNINGS_TARGETS SWMM SwmmInterface) -endif() - foreach(TARGET ${DISABLE_WARNINGS_TARGETS}) target_compile_options(${TARGET} PRIVATE $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:-w> diff --git a/ThirdParty/SwmmInterface b/ThirdParty/SwmmInterface deleted file mode 160000 index 141e05ae1f419918799d7bf9178ebcd97feb1ed3..0000000000000000000000000000000000000000 --- a/ThirdParty/SwmmInterface +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 141e05ae1f419918799d7bf9178ebcd97feb1ed3 diff --git a/scripts/cmake/Dependencies.cmake b/scripts/cmake/Dependencies.cmake index aeedbc60e46a150595273847b3a11160ed18809d..e4c1894650cc09bd82e9347cb84dbd28a8deb73e 100644 --- a/scripts/cmake/Dependencies.cmake +++ b/scripts/cmake/Dependencies.cmake @@ -168,6 +168,18 @@ if(OGS_USE_XDMF) endif() endif() +if(OGS_BUILD_SWMM) + CPMAddPackage( + NAME SWMMInterface + GITHUB_REPOSITORY ufz/SwmmInterface + GIT_TAG 141e05ae1f419918799d7bf9178ebcd97feb1ed3 + ) + if(SWMMInterface_ADDED) + target_include_directories(SwmmInterface SYSTEM PUBLIC ${SWMMInterface_SOURCE_DIR}) + list(APPEND DISABLE_WARNINGS_TARGETS SWMM SwmmInterface) + endif() +endif() + # Disable warnings foreach(TARGET ${DISABLE_WARNINGS_TARGETS}) target_compile_options(${TARGET} PRIVATE diff --git a/scripts/cmake/SubmoduleSetup.cmake b/scripts/cmake/SubmoduleSetup.cmake index 584efe7299b54f0b15c1b8861782cb27e1b4305e..4ca5a5eb1e1a3597f2f7ba6f0712e1fdaee03f64 100644 --- a/scripts/cmake/SubmoduleSetup.cmake +++ b/scripts/cmake/SubmoduleSetup.cmake @@ -3,9 +3,6 @@ if(NOT IS_GIT_REPO) endif() # This file initializes the required submodules -if(OGS_BUILD_SWMM) - list(APPEND REQUIRED_SUBMODULES ThirdParty/SwmmInterface) -endif() execute_process( COMMAND ${GIT_EXECUTABLE} submodule status