changeset 78:a2e5ea1869bd

fix build
author Alain Mazy <am@osimis.io>
date Wed, 15 Mar 2023 20:27:43 +0100
parents 94a9484d7f8f
children 94c5388ed30b
files Plugin/AuthorizationParserBase.h Plugin/ResourceHierarchyCache.cpp Plugin/ResourceHierarchyCache.h
diffstat 3 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Plugin/AuthorizationParserBase.h	Wed Mar 15 16:36:42 2023 +0100
+++ b/Plugin/AuthorizationParserBase.h	Wed Mar 15 20:27:43 2023 +0100
@@ -76,11 +76,13 @@
       resourceHierarchy_->Invalidate(level, id);
     }
 
+#if BUILD_UNIT_TESTS == 1
     FRIEND_TEST(DefaultAuthorizationParser, Parse);
   protected:
     ResourceHierarchyCache* GetResourceHierarchy()
     {
       return resourceHierarchy_.get();
     }
+#endif
   };
 }
--- a/Plugin/ResourceHierarchyCache.cpp	Wed Mar 15 16:36:42 2023 +0100
+++ b/Plugin/ResourceHierarchyCache.cpp	Wed Mar 15 20:27:43 2023 +0100
@@ -194,6 +194,7 @@
     }
   }
 
+#if BUILD_UNIT_TESTS == 1
   void ResourceHierarchyCache::AddOrthancDicomMapping(Orthanc::ResourceType level,
                                                       const std::string& orthancId,
                                                       const std::string& dicomUid)
@@ -208,6 +209,6 @@
   {
     cache_->Store(ComputeKey(childLevel, childOrthancId), parentOrthancId, 0 /* no expiration */);
   }
-
+#endif
 
 }
--- a/Plugin/ResourceHierarchyCache.h	Wed Mar 15 16:36:42 2023 +0100
+++ b/Plugin/ResourceHierarchyCache.h	Wed Mar 15 20:27:43 2023 +0100
@@ -89,6 +89,7 @@
                          Orthanc::ResourceType level,
                          const std::string& dicomUid);
 
+#if BUILD_UNIT_TESTS == 1
     FRIEND_TEST(DefaultAuthorizationParser, Parse);
   protected:
     void AddOrthancDicomMapping(Orthanc::ResourceType level,
@@ -98,6 +99,6 @@
     void AddParentLink(Orthanc::ResourceType childLevel,
                        const std::string& childOrthancId,
                        const std::string& parentOrthancId);
-
+#endif
   };
 }