comparison CMakeLists.txt @ 20:946377d1c992

skeleton for unit tests
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 17 Nov 2016 14:19:00 +0100
parents b8100f56d513
children 20f623762e8e
comparison
equal deleted inserted replaced
19:332328330083 20:946377d1c992
6 ## Build a static library containing the Orthanc Stone framework 6 ## Build a static library containing the Orthanc Stone framework
7 ##################################################################### 7 #####################################################################
8 8
9 include(Resources/CMake/OrthancStone.cmake) 9 include(Resources/CMake/OrthancStone.cmake)
10 add_library(OrthancStone STATIC ${ORTHANC_STONE_SOURCES}) 10 add_library(OrthancStone STATIC ${ORTHANC_STONE_SOURCES})
11
12
13 #####################################################################
14 ## CMake parameters for Google Test
15 #####################################################################
16
17 SET(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test")
18 SET(USE_GTEST_DEBIAN_SOURCE_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)")
19
20 include(${ORTHANC_ROOT}/Resources/CMake/GoogleTestConfiguration.cmake)
11 21
12 22
13 ##################################################################### 23 #####################################################################
14 ## Build all the sample applications 24 ## Build all the sample applications
15 ##################################################################### 25 #####################################################################
28 BuildSample(OrthancStoneSynchronizedSeries 6) 38 BuildSample(OrthancStoneSynchronizedSeries 6)
29 BuildSample(OrthancStoneLayoutPetCtFusion 7) 39 BuildSample(OrthancStoneLayoutPetCtFusion 7)
30 40
31 41
32 ##################################################################### 42 #####################################################################
43 ## Build the unit tests
44 #####################################################################
45
46 add_executable(UnitTests
47 ${GTEST_SOURCES}
48 UnitTestsSources/UnitTestsMain.cpp
49 )
50
51 target_link_libraries(UnitTests OrthancStone)
52
53
54 #####################################################################
33 ## Generate the documentation if Doxygen is present 55 ## Generate the documentation if Doxygen is present
34 ##################################################################### 56 #####################################################################
35 57
36 find_package(Doxygen) 58 find_package(Doxygen)
37 if (DOXYGEN_FOUND) 59 if (DOXYGEN_FOUND)