Mercurial > hg > orthanc
changeset 120:5af0a4345d06
disabling of unit tests
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 04 Oct 2012 18:00:21 +0200 |
parents | 2bc922bcfd2d |
children | e759f777cb72 |
files | CMakeLists.txt |
diffstat | 1 files changed, 16 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/CMakeLists.txt Thu Oct 04 15:09:40 2012 +0200 +++ b/CMakeLists.txt Thu Oct 04 18:00:21 2012 +0200 @@ -9,6 +9,7 @@ SET(STATIC_BUILD ON CACHE BOOL "Static build of the third-party libraries (necessary for Windows)") SET(STANDALONE_BUILD OFF CACHE BOOL "Standalone build (necessary for cross-compilation or binary releases)") SET(ENABLE_SSL ON CACHE BOOL "Include support for SSL") +SET(BUILD_UNIT_TESTS ON CACHE BOOL "Build the unit tests") SET(DEBIAN_HARDENING OFF CACHE BOOL "Use Debian hardening flags") if (${CMAKE_CROSSCOMPILING}) @@ -42,7 +43,6 @@ include(${CMAKE_SOURCE_DIR}/Resources/CMake/BoostConfiguration.cmake) include(${CMAKE_SOURCE_DIR}/Resources/CMake/DcmtkConfiguration.cmake) -include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake) include(${CMAKE_SOURCE_DIR}/Resources/CMake/MongooseConfiguration.cmake) include(${CMAKE_SOURCE_DIR}/Resources/CMake/ZlibConfiguration.cmake) include(${CMAKE_SOURCE_DIR}/Resources/CMake/SQLiteConfiguration.cmake) @@ -208,17 +208,22 @@ OrthancServer/main.cpp ) -add_executable(UnitTests - ${GTEST_SOURCES} - UnitTests/main.cpp - UnitTests/SQLite.cpp - UnitTests/SQLiteChromium.cpp - UnitTests/Versions.cpp - UnitTests/Zip.cpp - ) +TARGET_LINK_LIBRARIES(Orthanc ServerLibrary CoreLibrary) + -TARGET_LINK_LIBRARIES(Orthanc ServerLibrary CoreLibrary) -TARGET_LINK_LIBRARIES(UnitTests ServerLibrary CoreLibrary) +if (BUILD_UNIT_TESTS) + include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake) + add_executable(UnitTests + ${GTEST_SOURCES} + UnitTests/main.cpp + UnitTests/SQLite.cpp + UnitTests/SQLiteChromium.cpp + UnitTests/Versions.cpp + UnitTests/Zip.cpp + ) + TARGET_LINK_LIBRARIES(UnitTests ServerLibrary CoreLibrary) +endif() + find_package(Doxygen) if (DOXYGEN_FOUND)