Mercurial > hg > orthanc-stone
changeset 1174:ab3f3bb1bdb4
Merge
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 20 Nov 2019 13:25:38 +0100 |
parents | 1064098f496d (current diff) 5594d8d4a70f (diff) |
children | 57b38e609d32 3076a8a66db5 |
files | |
diffstat | 4 files changed, 29 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/Applications/Samples/CMakeLists.txt Wed Nov 20 12:34:29 2019 +0100 +++ b/Applications/Samples/CMakeLists.txt Wed Nov 20 13:25:38 2019 +0100 @@ -88,6 +88,10 @@ set(ENABLE_GOOGLE_TEST ON) set(ENABLE_WEB_CLIENT ON) +else() + set(ENABLE_NATIVE ON) + set(ENABLE_OPENGL OFF) + endif() @@ -182,16 +186,19 @@ target_link_libraries(${Target} OrthancStone) endmacro() -#BuildSingleFileSample(OrthancStoneEmpty EmptyApplication.h 1) -#BuildSingleFileSample(OrthancStoneTestPattern TestPatternApplication.h 2) -BuildSingleFileSample(OrthancStoneSingleFrame SingleFrameApplication.h 3) -#BuildSingleFileSample(OrthancStoneSingleVolume SingleVolumeApplication.h 4) -#BuildSingleFileSample(OrthancStoneBasicPetCtFusion 5) -#BuildSingleFileSample(OrthancStoneSynchronizedSeries 6) -#BuildSingleFileSample(OrthancStoneLayoutPetCtFusion 7) -BuildSingleFileSample(OrthancStoneSimpleViewerSingleFile SimpleViewerApplicationSingleFile.h 8) # we keep that one just as a sample before we convert another sample to this pattern -BuildSingleFileSample(OrthancStoneSingleFrameEditor SingleFrameEditorApplication.h 9) +if (ENABLE_SDL) + #BuildSingleFileSample(OrthancStoneEmpty EmptyApplication.h 1) + #BuildSingleFileSample(OrthancStoneTestPattern TestPatternApplication.h 2) + BuildSingleFileSample(OrthancStoneSingleFrame SingleFrameApplication.h 3) + #BuildSingleFileSample(OrthancStoneSingleVolume SingleVolumeApplication.h 4) + #BuildSingleFileSample(OrthancStoneBasicPetCtFusion 5) + #BuildSingleFileSample(OrthancStoneSynchronizedSeries 6) + #BuildSingleFileSample(OrthancStoneLayoutPetCtFusion 7) + BuildSingleFileSample(OrthancStoneSimpleViewerSingleFile SimpleViewerApplicationSingleFile.h 8) # we keep that one just as a sample before we convert another sample to this pattern + BuildSingleFileSample(OrthancStoneSingleFrameEditor SingleFrameEditorApplication.h 9) +endif() + ##### SimpleViewer sample (Qt and WASM only) ####### if (ENABLE_QT OR ENABLE_WASM)
--- a/Resources/CMake/OrthancStoneConfiguration.cmake Wed Nov 20 12:34:29 2019 +0100 +++ b/Resources/CMake/OrthancStoneConfiguration.cmake Wed Nov 20 13:25:38 2019 +0100 @@ -56,6 +56,12 @@ endif() endif() +if (ENABLE_OPENGL) + if (NOT ENABLE_QT AND NOT ENABLE_SDL AND NOT ENABLE_WASM) + message(FATAL_ERROR "Cannot enable OpenGL if WebAssembly, SDL and Qt are all disabled") + endif() +endif() + if (ENABLE_WASM) if (NOT ORTHANC_SANDBOXED) message(FATAL_ERROR "WebAssembly target must me configured as sandboxed")
--- a/UnitTestsSources/GenericToolboxTests.cpp Wed Nov 20 12:34:29 2019 +0100 +++ b/UnitTestsSources/GenericToolboxTests.cpp Wed Nov 20 13:25:38 2019 +0100 @@ -24,6 +24,8 @@ #include "stdint.h" +#include <cmath> + TEST(GenericToolbox, TestLegitDoubleString) { using OrthancStone::GenericToolbox::LegitDoubleString;
--- a/UnitTestsSources/TestStructureSet.cpp Wed Nov 20 12:34:29 2019 +0100 +++ b/UnitTestsSources/TestStructureSet.cpp Wed Nov 20 13:25:38 2019 +0100 @@ -4729,8 +4729,8 @@ } ds.Union(0, 4); - EXPECT_EQ(0, ds.Find(0)); - EXPECT_EQ(0, ds.Find(4)); + EXPECT_EQ(0u, ds.Find(0)); + EXPECT_EQ(0u, ds.Find(4)); ds.Union(4, 6); ds.Union(8, 9); @@ -4875,7 +4875,7 @@ boundaries.clear(); EXPECT_NO_THROW(AddSlabBoundaries(boundaries, slabCuts, 0)); - ASSERT_EQ(0, boundaries.size()); + ASSERT_EQ(0u, boundaries.size()); } TEST(StructureSet, ProcessBoundaryListTopRow) @@ -4889,7 +4889,7 @@ { size_t i = 0; - ASSERT_EQ(4, boundaries.size()); + ASSERT_EQ(4u, boundaries.size()); ASSERT_EQ(RectangleBoundaryKind_Start, boundaries[i].second); ASSERT_NEAR(5, boundaries[i].first, DELTA_MAX); @@ -4919,7 +4919,7 @@ AddSlabBoundaries(boundaries, slabCuts, 0); AddSlabBoundaries(boundaries, slabCuts, 1); - ASSERT_EQ(8, boundaries.size()); + ASSERT_EQ(8u, boundaries.size()); { size_t i = 0;