annotate UnitTestsSources/CMakeLists.txt @ 1871:7053b8a0aaec

upgrade to year 2022
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 11 Jan 2022 11:18:48 +0100
parents 3889ae96d2e9
children
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
1871
7053b8a0aaec upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1870
diff changeset
4 # Copyright (C) 2017-2022 Osimis S.A., Belgium
7053b8a0aaec upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1870
diff changeset
5 # Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
1589
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
6 #
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
7 # 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
8 # 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
9 # 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
10 # the License, or (at your option) any later version.
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
11 #
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
12 # 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
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
15 # Affero General Public License for more details.
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
16 #
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
17 # 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
18 # 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
19
8c5f9864545f adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
20
1541
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 cmake_minimum_required(VERSION 2.8.10)
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 project(UnitTests)
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
1587
a1405ab3a91c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1584
diff changeset
25 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
26
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system")
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 set(ORTHANC_BOOST_COMPONENTS program_options)
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 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
31 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
32 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
33 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
34 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
35
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 else()
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 set(ENABLE_GOOGLE_TEST ON)
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 endif()
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 set(ENABLE_OPENGL OFF)
1584
bd180f97c734 parsing osirix annotations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1581
diff changeset
41 set(ENABLE_PUGIXML ON)
1541
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42
1595
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
43 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
44 include(${CMAKE_CURRENT_SOURCE_DIR}/UnitTestsSources.cmake)
1541
ae17c8c8838f standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45
1771
f302bbddf94d sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1739
diff changeset
46 add_executable(UnitTests
f302bbddf94d sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1739
diff changeset
47 ${UNIT_TESTS_SOURCES}
f302bbddf94d sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1739
diff changeset
48 ${AUTOGENERATED_SOURCES}
f302bbddf94d sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1739
diff changeset
49 ${BOOST_EXTENDED_SOURCES}
f302bbddf94d sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1739
diff changeset
50 ${GOOGLE_TEST_SOURCES}
f302bbddf94d sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1739
diff changeset
51 ${ORTHANC_STONE_SOURCES}
f302bbddf94d sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1739
diff changeset
52 )
1595
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 #####################################################################
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
56 ## 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
57 #####################################################################
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
58
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
59 find_package(Doxygen)
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
60 if (DOXYGEN_FOUND)
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
61 configure_file(
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
62 ${ORTHANC_STONE_ROOT}/../Resources/OrthancStone.doxygen
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
63 ${CMAKE_CURRENT_BINARY_DIR}/OrthancStone.doxygen
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
64 @ONLY)
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
65
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
66 add_custom_target(doc
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
67 ${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
68 COMMENT "Generating documentation with Doxygen" VERBATIM
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
69 )
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
70 else()
621e4e11783d doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1589
diff changeset
71 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
72 endif()