From 4856e305b08a754d5161319fb28bb814717a91a9 Mon Sep 17 00:00:00 2001 From: Soeren Peters <peters@irmb.tu-bs.de> Date: Tue, 8 Sep 2020 15:50:56 +0200 Subject: [PATCH] Adapt apps to the new 3rd functions. Fix the cuda separate compilation. --- 3rdParty/googletest/version.txt | 3 +++ apps/gpu/LBM/DrivenCavity/CMakeLists.txt | 5 +---- apps/gpu/LBM/TGV_3D/3rdPartyLinking.cmake | 13 ------------- apps/gpu/LBM/TGV_3D/CMakeLists.txt | 12 +----------- apps/gpu/LBM/TGV_3D/CMakePackage.cmake | 9 --------- apps/gpu/LBM/TGV_3D_MultiGPU/3rdPartyLinking.cmake | 13 ------------- apps/gpu/LBM/TGV_3D_MultiGPU/CMakeLists.txt | 12 +----------- apps/gpu/LBM/TGV_3D_MultiGPU/CMakePackage.cmake | 9 --------- .../gpu/LBM/gridGeneratorTest/3rdPartyLinking.cmake | 13 ------------- apps/gpu/LBM/gridGeneratorTest/CMakeLists.txt | 12 +----------- apps/gpu/LBM/gridGeneratorTest/CMakePackage.cmake | 9 --------- src/gpu/GridGenerator/CMakeLists.txt | 3 ++- src/gpu/Traffic/CMakeLists.txt | 2 +- 13 files changed, 10 insertions(+), 105 deletions(-) create mode 100644 3rdParty/googletest/version.txt delete mode 100644 apps/gpu/LBM/TGV_3D/3rdPartyLinking.cmake delete mode 100644 apps/gpu/LBM/TGV_3D/CMakePackage.cmake delete mode 100644 apps/gpu/LBM/TGV_3D_MultiGPU/3rdPartyLinking.cmake delete mode 100644 apps/gpu/LBM/TGV_3D_MultiGPU/CMakePackage.cmake delete mode 100644 apps/gpu/LBM/gridGeneratorTest/3rdPartyLinking.cmake delete mode 100644 apps/gpu/LBM/gridGeneratorTest/CMakePackage.cmake diff --git a/3rdParty/googletest/version.txt b/3rdParty/googletest/version.txt new file mode 100644 index 000000000..b9fa3d3de --- /dev/null +++ b/3rdParty/googletest/version.txt @@ -0,0 +1,3 @@ +release v1.10.0, 03.10.2019 + +https://github.com/google/googletest/releases/tag/release-1.10.0 diff --git a/apps/gpu/LBM/DrivenCavity/CMakeLists.txt b/apps/gpu/LBM/DrivenCavity/CMakeLists.txt index a1963c9f6..16cd3e1b9 100644 --- a/apps/gpu/LBM/DrivenCavity/CMakeLists.txt +++ b/apps/gpu/LBM/DrivenCavity/CMakeLists.txt @@ -4,7 +4,4 @@ PROJECT(DrivenCavity) vf_add_library(BUILDTYPE binary DEPENDS VirtualFluids_GPU basics GridGenerator FILES DrivenCavity.cpp ) -include (${VF_CMAKE_DIR}/3rd/cuda.cmake) -include (${VF_CMAKE_DIR}/3rd/mpi.cmake) -include (${VF_CMAKE_DIR}/3rd/boost.cmake) -linkBoost ("serialization") +linkCUDA() diff --git a/apps/gpu/LBM/TGV_3D/3rdPartyLinking.cmake b/apps/gpu/LBM/TGV_3D/3rdPartyLinking.cmake deleted file mode 100644 index 30d15ff96..000000000 --- a/apps/gpu/LBM/TGV_3D/3rdPartyLinking.cmake +++ /dev/null @@ -1,13 +0,0 @@ -include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/MPI/Link.cmake) -linkMPI(${targetName}) -include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/Cuda/Link.cmake) -linkCuda(${targetName}) -include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/Boost/Link.cmake) -linkBoost(${targetName} "serialization") -#include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/Metis/Link.cmake) -#linkMetis(${targetName}) - -if(HULC.BUILD_JSONCPP) - include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/JsonCpp/Link.cmake) - linkJsonCpp(${targetName}) -endif() \ No newline at end of file diff --git a/apps/gpu/LBM/TGV_3D/CMakeLists.txt b/apps/gpu/LBM/TGV_3D/CMakeLists.txt index 56d9ac4f1..c8a724bf1 100644 --- a/apps/gpu/LBM/TGV_3D/CMakeLists.txt +++ b/apps/gpu/LBM/TGV_3D/CMakeLists.txt @@ -2,14 +2,4 @@ PROJECT(TGV_3D) vf_add_library(BUILDTYPE binary DEPENDS basics VirtualFluids_GPU GridGenerator FILES TGV_3D.cpp) -include (${VF_CMAKE_DIR}/3rd/cuda.cmake) -include (${VF_CMAKE_DIR}/3rd/mpi.cmake) -include (${VF_CMAKE_DIR}/3rd/boost.cmake) -linkBoost ("serialization") - -vf_get_library_name(library_name) -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/basics") -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/gpu") -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/gpu/VirtualFluids_GPU") -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/gpu/GridGenerator") -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/basics/Core") \ No newline at end of file +linkCUDA() diff --git a/apps/gpu/LBM/TGV_3D/CMakePackage.cmake b/apps/gpu/LBM/TGV_3D/CMakePackage.cmake deleted file mode 100644 index 5d39e3804..000000000 --- a/apps/gpu/LBM/TGV_3D/CMakePackage.cmake +++ /dev/null @@ -1,9 +0,0 @@ -#FILE ENDINGS -resetFileEndingsToCollect() -addCAndCPPFileTypes() -addFileEndingToCollect("*.cu") -addFileEndingToCollect("*.cuh") - -#GLOB SOURCE FILES IN MY_SRCS -unset(MY_SRCS) -includeRecursiveAllFilesFrom(${targetName} ${CMAKE_CURRENT_LIST_DIR}) \ No newline at end of file diff --git a/apps/gpu/LBM/TGV_3D_MultiGPU/3rdPartyLinking.cmake b/apps/gpu/LBM/TGV_3D_MultiGPU/3rdPartyLinking.cmake deleted file mode 100644 index 30d15ff96..000000000 --- a/apps/gpu/LBM/TGV_3D_MultiGPU/3rdPartyLinking.cmake +++ /dev/null @@ -1,13 +0,0 @@ -include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/MPI/Link.cmake) -linkMPI(${targetName}) -include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/Cuda/Link.cmake) -linkCuda(${targetName}) -include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/Boost/Link.cmake) -linkBoost(${targetName} "serialization") -#include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/Metis/Link.cmake) -#linkMetis(${targetName}) - -if(HULC.BUILD_JSONCPP) - include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/JsonCpp/Link.cmake) - linkJsonCpp(${targetName}) -endif() \ No newline at end of file diff --git a/apps/gpu/LBM/TGV_3D_MultiGPU/CMakeLists.txt b/apps/gpu/LBM/TGV_3D_MultiGPU/CMakeLists.txt index 24a7c8907..49846436e 100644 --- a/apps/gpu/LBM/TGV_3D_MultiGPU/CMakeLists.txt +++ b/apps/gpu/LBM/TGV_3D_MultiGPU/CMakeLists.txt @@ -2,14 +2,4 @@ PROJECT(TGV_3D_MultiGPU) vf_add_library(BUILDTYPE binary DEPENDS basics VirtualFluids_GPU GridGenerator FILES TGV_3D_MultiGPU.cpp) -include (${VF_CMAKE_DIR}/3rd/cuda.cmake) -include (${VF_CMAKE_DIR}/3rd/mpi.cmake) -include (${VF_CMAKE_DIR}/3rd/boost.cmake) -linkBoost ("serialization") - -vf_get_library_name(library_name) -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/basics") -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/gpu") -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/gpu/VirtualFluids_GPU") -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/gpu/GridGenerator") -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/basics/Core") \ No newline at end of file +linkCUDA() diff --git a/apps/gpu/LBM/TGV_3D_MultiGPU/CMakePackage.cmake b/apps/gpu/LBM/TGV_3D_MultiGPU/CMakePackage.cmake deleted file mode 100644 index 5d39e3804..000000000 --- a/apps/gpu/LBM/TGV_3D_MultiGPU/CMakePackage.cmake +++ /dev/null @@ -1,9 +0,0 @@ -#FILE ENDINGS -resetFileEndingsToCollect() -addCAndCPPFileTypes() -addFileEndingToCollect("*.cu") -addFileEndingToCollect("*.cuh") - -#GLOB SOURCE FILES IN MY_SRCS -unset(MY_SRCS) -includeRecursiveAllFilesFrom(${targetName} ${CMAKE_CURRENT_LIST_DIR}) \ No newline at end of file diff --git a/apps/gpu/LBM/gridGeneratorTest/3rdPartyLinking.cmake b/apps/gpu/LBM/gridGeneratorTest/3rdPartyLinking.cmake deleted file mode 100644 index 30d15ff96..000000000 --- a/apps/gpu/LBM/gridGeneratorTest/3rdPartyLinking.cmake +++ /dev/null @@ -1,13 +0,0 @@ -include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/MPI/Link.cmake) -linkMPI(${targetName}) -include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/Cuda/Link.cmake) -linkCuda(${targetName}) -include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/Boost/Link.cmake) -linkBoost(${targetName} "serialization") -#include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/Metis/Link.cmake) -#linkMetis(${targetName}) - -if(HULC.BUILD_JSONCPP) - include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/JsonCpp/Link.cmake) - linkJsonCpp(${targetName}) -endif() \ No newline at end of file diff --git a/apps/gpu/LBM/gridGeneratorTest/CMakeLists.txt b/apps/gpu/LBM/gridGeneratorTest/CMakeLists.txt index 8e249d2a2..cc8d8eb5d 100644 --- a/apps/gpu/LBM/gridGeneratorTest/CMakeLists.txt +++ b/apps/gpu/LBM/gridGeneratorTest/CMakeLists.txt @@ -2,14 +2,4 @@ PROJECT(GridGeneratorTest) vf_add_library(BUILDTYPE binary DEPENDS basics VirtualFluids_GPU GridGenerator FILES gridGenerator.cpp) -include (${VF_CMAKE_DIR}/3rd/cuda.cmake) -include (${VF_CMAKE_DIR}/3rd/mpi.cmake) -include (${VF_CMAKE_DIR}/3rd/boost.cmake) -linkBoost ("serialization") - -vf_get_library_name(library_name) -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/basics") -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/gpu") -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/gpu/VirtualFluids_GPU") -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/gpu/GridGenerator") -target_include_directories(${library_name} PRIVATE "${CMAKE_SOURCE_DIR}/src/basics/Core") \ No newline at end of file +linkCUDA() diff --git a/apps/gpu/LBM/gridGeneratorTest/CMakePackage.cmake b/apps/gpu/LBM/gridGeneratorTest/CMakePackage.cmake deleted file mode 100644 index 5d39e3804..000000000 --- a/apps/gpu/LBM/gridGeneratorTest/CMakePackage.cmake +++ /dev/null @@ -1,9 +0,0 @@ -#FILE ENDINGS -resetFileEndingsToCollect() -addCAndCPPFileTypes() -addFileEndingToCollect("*.cu") -addFileEndingToCollect("*.cuh") - -#GLOB SOURCE FILES IN MY_SRCS -unset(MY_SRCS) -includeRecursiveAllFilesFrom(${targetName} ${CMAKE_CURRENT_LIST_DIR}) \ No newline at end of file diff --git a/src/gpu/GridGenerator/CMakeLists.txt b/src/gpu/GridGenerator/CMakeLists.txt index 86b49cc47..2908e93cc 100644 --- a/src/gpu/GridGenerator/CMakeLists.txt +++ b/src/gpu/GridGenerator/CMakeLists.txt @@ -5,4 +5,5 @@ vf_add_library(BUILDTYPE shared DEPENDS basics) linkCUDA() linkOpenMP() -set_property(TARGET ${library_name} PROPERTY CUDA_SEPARABLE_COMPILATION ON) \ No newline at end of file +vf_get_library_name(library_name) +set_target_properties(${library_name} PROPERTIES CUDA_SEPARABLE_COMPILATION ON) \ No newline at end of file diff --git a/src/gpu/Traffic/CMakeLists.txt b/src/gpu/Traffic/CMakeLists.txt index 18e671577..8876b7090 100644 --- a/src/gpu/Traffic/CMakeLists.txt +++ b/src/gpu/Traffic/CMakeLists.txt @@ -2,4 +2,4 @@ vf_add_library(BUILDTYPE shared DEPENDS GridGenerator basics) -include (${VF_CMAKE_DIR}/3rd/cuda.cmake) +linkCUDA() \ No newline at end of file -- GitLab