Mercurial > hg > orthanc-stone
annotate OrthancStone/UnitTestsSources/CMakeLists.txt @ 2123:538c7b7c6e46 deep-learning
integration mainline->deep-learning
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 22 Mar 2024 16:11:42 +0100 |
parents | c23eef785569 |
children | 16c01cc201e7 |
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 |
2114
c23eef785569
update year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2110
diff
changeset
|
4 # Copyright (C) 2017-2024 Osimis S.A., Belgium |
c23eef785569
update year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2110
diff
changeset
|
5 # Copyright (C) 2021-2024 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 |
1877
a2955abe4c2e
skeleton for the RenderingPlugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1871
diff
changeset
|
8 # modify it under the terms of the GNU Lesser General Public License |
1589
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 |
1877
a2955abe4c2e
skeleton for the RenderingPlugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1871
diff
changeset
|
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
a2955abe4c2e
skeleton for the RenderingPlugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1871
diff
changeset
|
15 # Lesser General Public License for more details. |
1589
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1587
diff
changeset
|
16 # |
1877
a2955abe4c2e
skeleton for the RenderingPlugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1871
diff
changeset
|
17 # You should have received a copy of the GNU Lesser General Public |
a2955abe4c2e
skeleton for the RenderingPlugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1871
diff
changeset
|
18 # License along with this program. If not, see |
a2955abe4c2e
skeleton for the RenderingPlugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1871
diff
changeset
|
19 # <http://www.gnu.org/licenses/>. |
1589
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1587
diff
changeset
|
20 |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1587
diff
changeset
|
21 |
1541
ae17c8c8838f
standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 cmake_minimum_required(VERSION 2.8.10) |
1880
93c3f9234286
simplifying TestStructureSet.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1877
diff
changeset
|
23 cmake_policy(SET CMP0058 NEW) |
1541
ae17c8c8838f
standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 |
ae17c8c8838f
standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 project(UnitTests) |
ae17c8c8838f
standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 |
1877
a2955abe4c2e
skeleton for the RenderingPlugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1871
diff
changeset
|
27 set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "mainline") |
a2955abe4c2e
skeleton for the RenderingPlugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1871
diff
changeset
|
28 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") |
a2955abe4c2e
skeleton for the RenderingPlugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1871
diff
changeset
|
29 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/OrthancStoneParameters.cmake) |
1541
ae17c8c8838f
standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 |
ae17c8c8838f
standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") |
ae17c8c8838f
standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 set(ORTHANC_BOOST_COMPONENTS program_options) |
ae17c8c8838f
standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 |
ae17c8c8838f
standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 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
|
35 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
|
36 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
|
37 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
|
38 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
|
39 |
ae17c8c8838f
standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 else() |
ae17c8c8838f
standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 set(ENABLE_GOOGLE_TEST ON) |
ae17c8c8838f
standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 endif() |
ae17c8c8838f
standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 |
ae17c8c8838f
standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 set(ENABLE_OPENGL OFF) |
1584
bd180f97c734
parsing osirix annotations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
45 set(ENABLE_PUGIXML ON) |
1541
ae17c8c8838f
standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 |
1595
621e4e11783d
doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
47 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
|
48 include(${CMAKE_CURRENT_SOURCE_DIR}/UnitTestsSources.cmake) |
1541
ae17c8c8838f
standalone compilation of unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 |
1881
a05529952510
fix build of unit tests in SDL project
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1880
diff
changeset
|
50 EmbedResources( |
a05529952510
fix build of unit tests in SDL project
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1880
diff
changeset
|
51 RT_STRUCT_00 ${CMAKE_CURRENT_SOURCE_DIR}/TestStructureSet.json |
a05529952510
fix build of unit tests in SDL project
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1880
diff
changeset
|
52 ) |
a05529952510
fix build of unit tests in SDL project
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1880
diff
changeset
|
53 |
1771
f302bbddf94d
sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
54 add_executable(UnitTests |
f302bbddf94d
sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
55 ${UNIT_TESTS_SOURCES} |
f302bbddf94d
sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
56 ${AUTOGENERATED_SOURCES} |
f302bbddf94d
sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
57 ${BOOST_EXTENDED_SOURCES} |
f302bbddf94d
sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
58 ${GOOGLE_TEST_SOURCES} |
f302bbddf94d
sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
59 ${ORTHANC_STONE_SOURCES} |
f302bbddf94d
sync, trying to fix DicomVolumeImageReslicer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
60 ) |
1595
621e4e11783d
doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
61 |
2110
352cb0fa57b2
fixed handling of DefineSourceBasenameForTarget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2077
diff
changeset
|
62 if (COMMAND DefineSourceBasenameForTarget) |
352cb0fa57b2
fixed handling of DefineSourceBasenameForTarget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2077
diff
changeset
|
63 DefineSourceBasenameForTarget(UnitTests) |
352cb0fa57b2
fixed handling of DefineSourceBasenameForTarget
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2077
diff
changeset
|
64 endif() |
2076
990f396484b1
fix rendering of RT-DOSE with negative GridFrameOffsetVector
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1881
diff
changeset
|
65 |
1880
93c3f9234286
simplifying TestStructureSet.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1877
diff
changeset
|
66 add_custom_command( |
93c3f9234286
simplifying TestStructureSet.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1877
diff
changeset
|
67 TARGET UnitTests |
93c3f9234286
simplifying TestStructureSet.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1877
diff
changeset
|
68 POST_BUILD |
93c3f9234286
simplifying TestStructureSet.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1877
diff
changeset
|
69 COMMAND ${CMAKE_COMMAND} -E copy |
93c3f9234286
simplifying TestStructureSet.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1877
diff
changeset
|
70 "${CMAKE_SOURCE_DIR}/72c773ac-5059f2c4-2e6a9120-4fd4bca1-45701661.json" |
93c3f9234286
simplifying TestStructureSet.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1877
diff
changeset
|
71 "$<TARGET_FILE_DIR:UnitTests>/72c773ac-5059f2c4-2e6a9120-4fd4bca1-45701661.json" |
93c3f9234286
simplifying TestStructureSet.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1877
diff
changeset
|
72 ) |
93c3f9234286
simplifying TestStructureSet.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1877
diff
changeset
|
73 |
1595
621e4e11783d
doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
74 |
621e4e11783d
doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
75 ##################################################################### |
621e4e11783d
doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
76 ## 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
|
77 ##################################################################### |
621e4e11783d
doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
78 |
621e4e11783d
doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
79 find_package(Doxygen) |
621e4e11783d
doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
80 if (DOXYGEN_FOUND) |
621e4e11783d
doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
81 configure_file( |
621e4e11783d
doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
82 ${ORTHANC_STONE_ROOT}/../Resources/OrthancStone.doxygen |
621e4e11783d
doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
83 ${CMAKE_CURRENT_BINARY_DIR}/OrthancStone.doxygen |
621e4e11783d
doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
84 @ONLY) |
621e4e11783d
doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
85 |
621e4e11783d
doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
86 add_custom_target(doc |
621e4e11783d
doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
87 ${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
|
88 COMMENT "Generating documentation with Doxygen" VERBATIM |
621e4e11783d
doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
89 ) |
621e4e11783d
doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
90 else() |
621e4e11783d
doxygen target, more consistent ORTHANC_STONE_ROOT
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
91 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
|
92 endif() |