annotate UnitTestsSources/CMakeLists.txt @ 1798:41f3872bd7d2

create angle tool and delete measure tool
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 20 May 2021 11:10:14 +0200
parents f302bbddf94d
children 3889ae96d2e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1589
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
1 # Stone of Orthanc
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
3 # Department, University Hospital of Liege, Belgium
1739
9ac2a65d4172 upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1679
diff changeset
4 # Copyright (C) 2017-2021 Osimis S.A., Belgium
1589
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
5 #
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
6 # This program is free software: you can redistribute it and/or
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
7 # modify it under the terms of the GNU Affero General Public License
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
8 # as published by the Free Software Foundation, either version 3 of
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
9 # the License, or (at your option) any later version.
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
10 #
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
11 # This program is distributed in the hope that it will be useful, but
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
14 # Affero General Public License for more details.
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
15 #
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
16 # You should have received a copy of the GNU Affero General Public License
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
18
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
19
1541
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 cmake_minimum_required(VERSION 2.8.10)
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 project(UnitTests)
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
1587
a1405ab3a91c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1584
diff changeset
24 include(${CMAKE_SOURCE_DIR}/../OrthancStone/Resources/CMake/OrthancStoneParameters.cmake)
1541
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system")
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 set(ORTHANC_BOOST_COMPONENTS program_options)
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 set(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test")
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 set(USE_GOOGLE_TEST_DEBIAN_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)")
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 mark_as_advanced(USE_GOOGLE_TEST_DEBIAN_PACKAGE)
1595
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
32 include(${ORTHANC_STONE_ROOT}/../Resources/Orthanc/CMake/DownloadPackage.cmake)
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
33 include(${ORTHANC_STONE_ROOT}/../Resources/Orthanc/CMake/GoogleTestConfiguration.cmake)
1541
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 else()
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 set(ENABLE_GOOGLE_TEST ON)
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 endif()
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 set(ENABLE_OPENGL OFF)
1584
bd180f97c734 parsing osirix annotations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1581
diff changeset
40 set(ENABLE_PUGIXML ON)
1541
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41
1595
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
42 include(${ORTHANC_STONE_ROOT}/../Resources/CMake/OrthancStoneConfiguration.cmake)
1679
5b8b88e5bfd6 successfully running unit tests in WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1595
diff changeset
43 include(${CMAKE_CURRENT_SOURCE_DIR}/UnitTestsSources.cmake)
1541
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44
1771
f302bbddf94d sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1739
diff changeset
45 add_executable(UnitTests
f302bbddf94d sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1739
diff changeset
46 ${UNIT_TESTS_SOURCES}
f302bbddf94d sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1739
diff changeset
47 ${AUTOGENERATED_SOURCES}
f302bbddf94d sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1739
diff changeset
48 ${BOOST_EXTENDED_SOURCES}
f302bbddf94d sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1739
diff changeset
49 ${GOOGLE_TEST_SOURCES}
f302bbddf94d sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1739
diff changeset
50 ${ORTHANC_STONE_SOURCES}
f302bbddf94d sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1739
diff changeset
51 )
1595
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
52
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
53
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
54 #####################################################################
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
55 ## Generate the documentation if Doxygen is present
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
56 #####################################################################
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
57
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
58 find_package(Doxygen)
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
59 if (DOXYGEN_FOUND)
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
60 configure_file(
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
61 ${ORTHANC_STONE_ROOT}/../Resources/OrthancStone.doxygen
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
62 ${CMAKE_CURRENT_BINARY_DIR}/OrthancStone.doxygen
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
63 @ONLY)
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
64
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
65 add_custom_target(doc
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
66 ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/OrthancStone.doxygen
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
67 COMMENT "Generating documentation with Doxygen" VERBATIM
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
68 )
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
69 else()
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
70 message("Doxygen not found. The documentation will not be built.")
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
71 endif()