From 84175f1ddc64404f97debef907075c7dd3fe5e8d Mon Sep 17 00:00:00 2001 From: Soeren Peters <peters@irmb.tu-bs.de> Date: Thu, 12 Oct 2017 17:13:58 +0200 Subject: [PATCH] - adds gridgen test --- CMakeLists.txt | 1 + .../tests/GridGeneratorTest/3rdPartyLinking.cmake | 2 +- targets/tests/GridGeneratorTest/CMakeLists.txt | 2 +- .../tests/GridGeneratorTest/CMakePackage.cmake | 2 +- targets/tests/Input.Test/3rdPartyLinking.cmake | 5 ----- targets/tests/Input.Test/CMakeLists.txt | 15 --------------- targets/tests/Input.Test/CMakePackage.cmake | 8 -------- targets/tests/Input.Test/main.cpp | 7 ------- targets/tests/Input.Test/package.include | 0 targets/tests/Logger.Test/3rdPartyLinking.cmake | 3 --- targets/tests/Logger.Test/CMakeLists.txt | 14 -------------- targets/tests/Logger.Test/CMakePackage.cmake | 8 -------- targets/tests/Logger.Test/main.cpp | 9 --------- targets/tests/Logger.Test/package.include | 0 .../tests/utilities.Test/3rdPartyLinking.cmake | 3 --- targets/tests/utilities.Test/CMakeLists.txt | 14 -------------- targets/tests/utilities.Test/CMakePackage.cmake | 8 -------- targets/tests/utilities.Test/main.cpp | 8 -------- targets/tests/utilities.Test/package.include | 0 19 files changed, 4 insertions(+), 105 deletions(-) delete mode 100644 targets/tests/Input.Test/3rdPartyLinking.cmake delete mode 100644 targets/tests/Input.Test/CMakeLists.txt delete mode 100644 targets/tests/Input.Test/CMakePackage.cmake delete mode 100644 targets/tests/Input.Test/main.cpp delete mode 100644 targets/tests/Input.Test/package.include delete mode 100644 targets/tests/Logger.Test/3rdPartyLinking.cmake delete mode 100644 targets/tests/Logger.Test/CMakeLists.txt delete mode 100644 targets/tests/Logger.Test/CMakePackage.cmake delete mode 100644 targets/tests/Logger.Test/main.cpp delete mode 100644 targets/tests/Logger.Test/package.include delete mode 100644 targets/tests/utilities.Test/3rdPartyLinking.cmake delete mode 100644 targets/tests/utilities.Test/CMakeLists.txt delete mode 100644 targets/tests/utilities.Test/CMakePackage.cmake delete mode 100644 targets/tests/utilities.Test/main.cpp delete mode 100644 targets/tests/utilities.Test/package.include diff --git a/CMakeLists.txt b/CMakeLists.txt index be06e1541..44190bf90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,6 +97,7 @@ add_subdirectory(targets/libs/GridGenerator) set(BUILD_TESTS ON CACHE BOOL "Build shared libraries") if(BUILD_TESTS) add_subdirectory(3rdParty/googletest) + add_subdirectory(targets/tests/GridGeneratorTest) #add_subdirectory(targets/tests/VirtualFluidsTest) add_subdirectory(targets/tests/VirtualFluidsBasicsTest) endif() diff --git a/targets/tests/GridGeneratorTest/3rdPartyLinking.cmake b/targets/tests/GridGeneratorTest/3rdPartyLinking.cmake index af583545a..f621a1361 100644 --- a/targets/tests/GridGeneratorTest/3rdPartyLinking.cmake +++ b/targets/tests/GridGeneratorTest/3rdPartyLinking.cmake @@ -5,4 +5,4 @@ linkMPI(${targetName}) include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/Cuda/Link.cmake) linkCuda(${targetName}) include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/Boost/Link.cmake) -linkBoost(${targetName}) \ No newline at end of file +linkBoost(${targetName} "") \ No newline at end of file diff --git a/targets/tests/GridGeneratorTest/CMakeLists.txt b/targets/tests/GridGeneratorTest/CMakeLists.txt index 1d33c0783..e40a48a82 100644 --- a/targets/tests/GridGeneratorTest/CMakeLists.txt +++ b/targets/tests/GridGeneratorTest/CMakeLists.txt @@ -2,7 +2,7 @@ setTargetNameToFolderName(${CMAKE_CURRENT_LIST_DIR}) set(linkDirectories "") set(libsToLink GridGenerator) -set(includeDirectories ${PROJECT_SOURCE_DIR}/src) +set(includeDirectories ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/GridGenerator) #glob files and save in MY_SRCS include(CMakePackage.cmake) diff --git a/targets/tests/GridGeneratorTest/CMakePackage.cmake b/targets/tests/GridGeneratorTest/CMakePackage.cmake index 2f8c3b65e..d4fe81711 100644 --- a/targets/tests/GridGeneratorTest/CMakePackage.cmake +++ b/targets/tests/GridGeneratorTest/CMakePackage.cmake @@ -5,4 +5,4 @@ addCAndCPPFileTypes() #GLOB SOURCE FILES IN MY_SRCS unset(MY_SRCS) includeRecursiveAllFilesFrom(${targetName} ${CMAKE_CURRENT_LIST_DIR}) -includeRecursiveTestFilesFrom(GridGenerator ${PROJECT_SOURCE_DIR}/src) +includeRecursiveTestFilesFrom(GridGenerator ${CMAKE_SOURCE_DIR}/src/GridGenerator) diff --git a/targets/tests/Input.Test/3rdPartyLinking.cmake b/targets/tests/Input.Test/3rdPartyLinking.cmake deleted file mode 100644 index 408176efc..000000000 --- a/targets/tests/Input.Test/3rdPartyLinking.cmake +++ /dev/null @@ -1,5 +0,0 @@ -include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/GMock/Link.cmake) -linkGMock(${targetName}) - -include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/JsonCpp/Link.cmake) -linkJsonCpp(${targetName}) \ No newline at end of file diff --git a/targets/tests/Input.Test/CMakeLists.txt b/targets/tests/Input.Test/CMakeLists.txt deleted file mode 100644 index 869c0bdee..000000000 --- a/targets/tests/Input.Test/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -setTargetNameToFolderName(${CMAKE_CURRENT_LIST_DIR}) - -set(linkDirectories "") -set(libsToLink Input) -set(includeDirectories ${PROJECT_SOURCE_DIR}/src) - -#glob files and save in MY_SRCS -include(CMakePackage.cmake) - - -buildExe(${targetName} "${MY_SRCS}" "${linkDirectories}" "${libsToLink}" "${includeDirectories}") -groupTarget(${targetName} ${testFolder}) - -#Specify the linking to 3rdParty libs -include(3rdPartyLinking.cmake) diff --git a/targets/tests/Input.Test/CMakePackage.cmake b/targets/tests/Input.Test/CMakePackage.cmake deleted file mode 100644 index 5658269ea..000000000 --- a/targets/tests/Input.Test/CMakePackage.cmake +++ /dev/null @@ -1,8 +0,0 @@ -#FILE ENDINGS -resetFileEndingsToCollect() -addCAndCPPFileTypes() - -#GLOB SOURCE FILES IN MY_SRCS -unset(MY_SRCS) -includeRecursiveAllFilesFrom(${targetName} ${CMAKE_CURRENT_LIST_DIR}) -includeRecursiveTestFilesFrom(Input ${PROJECT_SOURCE_DIR}/src) diff --git a/targets/tests/Input.Test/main.cpp b/targets/tests/Input.Test/main.cpp deleted file mode 100644 index 360189157..000000000 --- a/targets/tests/Input.Test/main.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include "gmock/gmock.h" - -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/targets/tests/Input.Test/package.include b/targets/tests/Input.Test/package.include deleted file mode 100644 index e69de29bb..000000000 diff --git a/targets/tests/Logger.Test/3rdPartyLinking.cmake b/targets/tests/Logger.Test/3rdPartyLinking.cmake deleted file mode 100644 index c8ec68202..000000000 --- a/targets/tests/Logger.Test/3rdPartyLinking.cmake +++ /dev/null @@ -1,3 +0,0 @@ -include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/GMock/Link.cmake) -linkGMock(${targetName}) - diff --git a/targets/tests/Logger.Test/CMakeLists.txt b/targets/tests/Logger.Test/CMakeLists.txt deleted file mode 100644 index a47bac5dd..000000000 --- a/targets/tests/Logger.Test/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -setTargetNameToFolderName(${CMAKE_CURRENT_LIST_DIR}) - -set(linkDirectories "") -set(libsToLink Logger) -set(includeDirectories ${PROJECT_SOURCE_DIR}/src) - -#glob files and save in MY_SRCS -include(CMakePackage.cmake) - -buildExe(${targetName} "${MY_SRCS}" "${linkDirectories}" "${libsToLink}" "${includeDirectories}") -groupTarget(${targetName} ${testFolder}) - -#Specify the linking to 3rdParty libs -include(3rdPartyLinking.cmake) diff --git a/targets/tests/Logger.Test/CMakePackage.cmake b/targets/tests/Logger.Test/CMakePackage.cmake deleted file mode 100644 index fa4439939..000000000 --- a/targets/tests/Logger.Test/CMakePackage.cmake +++ /dev/null @@ -1,8 +0,0 @@ -#FILE ENDINGS -resetFileEndingsToCollect() -addCAndCPPFileTypes() - -#GLOB SOURCE FILES IN MY_SRCS -unset(MY_SRCS) -includeRecursiveAllFilesFrom(${targetName} ${CMAKE_CURRENT_LIST_DIR}) -includeRecursiveTestFilesFrom(Logger ${PROJECT_SOURCE_DIR}/src) diff --git a/targets/tests/Logger.Test/main.cpp b/targets/tests/Logger.Test/main.cpp deleted file mode 100644 index 1acaa3b9e..000000000 --- a/targets/tests/Logger.Test/main.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include "gmock/gmock.h" - - -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} - diff --git a/targets/tests/Logger.Test/package.include b/targets/tests/Logger.Test/package.include deleted file mode 100644 index e69de29bb..000000000 diff --git a/targets/tests/utilities.Test/3rdPartyLinking.cmake b/targets/tests/utilities.Test/3rdPartyLinking.cmake deleted file mode 100644 index c8ec68202..000000000 --- a/targets/tests/utilities.Test/3rdPartyLinking.cmake +++ /dev/null @@ -1,3 +0,0 @@ -include (${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/GMock/Link.cmake) -linkGMock(${targetName}) - diff --git a/targets/tests/utilities.Test/CMakeLists.txt b/targets/tests/utilities.Test/CMakeLists.txt deleted file mode 100644 index e52d67593..000000000 --- a/targets/tests/utilities.Test/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -setTargetNameToFolderName(${CMAKE_CURRENT_LIST_DIR}) - -set(linkDirectories "") -set(libsToLink utilities) -set(includeDirectories ${PROJECT_SOURCE_DIR}/src) - -#glob files and save in MY_SRCS -include(CMakePackage.cmake) - -buildExe(${targetName} "${MY_SRCS}" "${linkDirectories}" "${libsToLink}" "${includeDirectories}") -groupTarget(${targetName} ${testFolder}) - -#Specify the linking to 3rdParty libs -include(3rdPartyLinking.cmake) diff --git a/targets/tests/utilities.Test/CMakePackage.cmake b/targets/tests/utilities.Test/CMakePackage.cmake deleted file mode 100644 index e3309614a..000000000 --- a/targets/tests/utilities.Test/CMakePackage.cmake +++ /dev/null @@ -1,8 +0,0 @@ -#FILE ENDINGS -resetFileEndingsToCollect() -addCAndCPPFileTypes() - -#GLOB SOURCE FILES IN MY_SRCS -unset(MY_SRCS) -includeRecursiveAllFilesFrom(${targetName} ${CMAKE_CURRENT_LIST_DIR}) -includeRecursiveTestFilesFrom(utilities ${PROJECT_SOURCE_DIR}/src) diff --git a/targets/tests/utilities.Test/main.cpp b/targets/tests/utilities.Test/main.cpp deleted file mode 100644 index 3f1aead4b..000000000 --- a/targets/tests/utilities.Test/main.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include "gmock/gmock.h" - -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} - diff --git a/targets/tests/utilities.Test/package.include b/targets/tests/utilities.Test/package.include deleted file mode 100644 index e69de29bb..000000000 -- GitLab