From db078c91cea433148907700b71a0f3d8f0c98afc Mon Sep 17 00:00:00 2001 From: Sergey Kosov Date: Sun, 31 Dec 2017 17:23:24 +0100 Subject: [PATCH] test code reorganized --- {tests => 3rdparty/gtest}/gtest-all.cpp | 0 {include => 3rdparty}/gtest/gtest.h | 0 tests/CMakeLists.txt | 14 +++++++------- 3 files changed, 7 insertions(+), 7 deletions(-) rename {tests => 3rdparty/gtest}/gtest-all.cpp (100%) rename {include => 3rdparty}/gtest/gtest.h (100%) diff --git a/tests/gtest-all.cpp b/3rdparty/gtest/gtest-all.cpp similarity index 100% rename from tests/gtest-all.cpp rename to 3rdparty/gtest/gtest-all.cpp diff --git a/include/gtest/gtest.h b/3rdparty/gtest/gtest.h similarity index 100% rename from include/gtest/gtest.h rename to 3rdparty/gtest/gtest.h diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index aa3df617..0685a272 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,17 +1,17 @@ -file(GLOB TESTS_INCLUDE ${PROJECT_SOURCE_DIR}/include/gtest/gtest.h) -file(GLOB TESTS_SOURCES "*.cpp") +file(GLOB GTEST_SOURCES "${PROJECT_SOURCE_DIR}/3rdparty/gtest/*.cpp") +file(GLOB TESTS_SOURCES "*.cpp" ) file(GLOB TESTS_HEADERS "*.h") # Create named folders for the sources within the .vcproj # Empty name lists them directly under the .vcproj -source_group("Include" FILES ${TESTS_INCLUDE}) -source_group("" FILES ${TESTS_SOURCES} ${TESTS_HEADERS}) -source_group("Source Files" FILES "main.cpp" "gtest-all.cpp") +source_group("" FILES ${TESTS_SOURCES} ${TESTS_HEADERS}) +source_group("Source Files" FILES "main.cpp" ${GTEST_SOURCES}) source_group("Source Files\\Tests" FILES "Tests.h" "Tests.cpp") # Properties -> C/C++ -> General -> Additional Include Directories -include_directories(${PROJECT_SOURCE_DIR}/include +include_directories(${PROJECT_SOURCE_DIR}/3rdparty/ + ${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/modules ${OpenCV_INCLUDE_DIRS} ) @@ -19,7 +19,7 @@ include_directories(${PROJECT_SOURCE_DIR}/include # Properties -> Linker -> General -> Additional Library Directories link_directories(${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) -add_executable(Tests ${TESTS_INCLUDE} ${TESTS_SOURCES} ${TESTS_HEADERS}) +add_executable(Tests ${TESTS_SOURCES} ${TESTS_HEADERS} ${GTEST_SOURCES}) add_dependencies(Tests DGM) # Properties->Linker->Input->Additional Dependencies