comparison CMakeLists.txt @ 120:5af0a4345d06

disabling of unit tests
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 04 Oct 2012 18:00:21 +0200
parents 7593b57dc1bf
children 1267071a697e
comparison
equal deleted inserted replaced
118:2bc922bcfd2d 120:5af0a4345d06
7 include(CheckIncludeFileCXX) 7 include(CheckIncludeFileCXX)
8 8
9 SET(STATIC_BUILD ON CACHE BOOL "Static build of the third-party libraries (necessary for Windows)") 9 SET(STATIC_BUILD ON CACHE BOOL "Static build of the third-party libraries (necessary for Windows)")
10 SET(STANDALONE_BUILD OFF CACHE BOOL "Standalone build (necessary for cross-compilation or binary releases)") 10 SET(STANDALONE_BUILD OFF CACHE BOOL "Standalone build (necessary for cross-compilation or binary releases)")
11 SET(ENABLE_SSL ON CACHE BOOL "Include support for SSL") 11 SET(ENABLE_SSL ON CACHE BOOL "Include support for SSL")
12 SET(BUILD_UNIT_TESTS ON CACHE BOOL "Build the unit tests")
12 SET(DEBIAN_HARDENING OFF CACHE BOOL "Use Debian hardening flags") 13 SET(DEBIAN_HARDENING OFF CACHE BOOL "Use Debian hardening flags")
13 14
14 if (${CMAKE_CROSSCOMPILING}) 15 if (${CMAKE_CROSSCOMPILING})
15 SET(STANDALONE_BUILD ON) 16 SET(STANDALONE_BUILD ON)
16 endif() 17 endif()
40 add_definitions(-DORTHANC_SSL_ENABLED=0) 41 add_definitions(-DORTHANC_SSL_ENABLED=0)
41 endif() 42 endif()
42 43
43 include(${CMAKE_SOURCE_DIR}/Resources/CMake/BoostConfiguration.cmake) 44 include(${CMAKE_SOURCE_DIR}/Resources/CMake/BoostConfiguration.cmake)
44 include(${CMAKE_SOURCE_DIR}/Resources/CMake/DcmtkConfiguration.cmake) 45 include(${CMAKE_SOURCE_DIR}/Resources/CMake/DcmtkConfiguration.cmake)
45 include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake)
46 include(${CMAKE_SOURCE_DIR}/Resources/CMake/MongooseConfiguration.cmake) 46 include(${CMAKE_SOURCE_DIR}/Resources/CMake/MongooseConfiguration.cmake)
47 include(${CMAKE_SOURCE_DIR}/Resources/CMake/ZlibConfiguration.cmake) 47 include(${CMAKE_SOURCE_DIR}/Resources/CMake/ZlibConfiguration.cmake)
48 include(${CMAKE_SOURCE_DIR}/Resources/CMake/SQLiteConfiguration.cmake) 48 include(${CMAKE_SOURCE_DIR}/Resources/CMake/SQLiteConfiguration.cmake)
49 include(${CMAKE_SOURCE_DIR}/Resources/CMake/JsonCppConfiguration.cmake) 49 include(${CMAKE_SOURCE_DIR}/Resources/CMake/JsonCppConfiguration.cmake)
50 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibCurlConfiguration.cmake) 50 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibCurlConfiguration.cmake)
206 206
207 add_executable(Orthanc 207 add_executable(Orthanc
208 OrthancServer/main.cpp 208 OrthancServer/main.cpp
209 ) 209 )
210 210
211 add_executable(UnitTests
212 ${GTEST_SOURCES}
213 UnitTests/main.cpp
214 UnitTests/SQLite.cpp
215 UnitTests/SQLiteChromium.cpp
216 UnitTests/Versions.cpp
217 UnitTests/Zip.cpp
218 )
219
220 TARGET_LINK_LIBRARIES(Orthanc ServerLibrary CoreLibrary) 211 TARGET_LINK_LIBRARIES(Orthanc ServerLibrary CoreLibrary)
221 TARGET_LINK_LIBRARIES(UnitTests ServerLibrary CoreLibrary) 212
213
214 if (BUILD_UNIT_TESTS)
215 include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake)
216 add_executable(UnitTests
217 ${GTEST_SOURCES}
218 UnitTests/main.cpp
219 UnitTests/SQLite.cpp
220 UnitTests/SQLiteChromium.cpp
221 UnitTests/Versions.cpp
222 UnitTests/Zip.cpp
223 )
224 TARGET_LINK_LIBRARIES(UnitTests ServerLibrary CoreLibrary)
225 endif()
226
222 227
223 find_package(Doxygen) 228 find_package(Doxygen)
224 if (DOXYGEN_FOUND) 229 if (DOXYGEN_FOUND)
225 configure_file( 230 configure_file(
226 ${CMAKE_SOURCE_DIR}/Resources/Orthanc.doxygen 231 ${CMAKE_SOURCE_DIR}/Resources/Orthanc.doxygen