Bug 166 - CMake find_boost version is now broken with newer boost/cmake
Summary: CMake find_boost version is now broken with newer boost/cmake
Status: RESOLVED FIXED
Alias: None
Product: Orthanc
Classification: Unclassified
Component: Orthanc Core (show other bugs)
Version: unspecified
Hardware: All All
: --- normal
Assignee: Sébastien Jodogne
URL:
Depends on:
Blocks:
 
Reported: 2020-06-29 15:16 CEST by Sébastien Jodogne
Modified: 2020-06-29 15:26 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sébastien Jodogne 2020-06-29 15:16:30 CEST
[BitBucket user: xnox]
[BitBucket date: 2020-02-05.13:40:06]

Here is patch to fix it.

Cannot push a repository as mercurial is disabled on Bitbucket now

```diff
diff -r 94f4a18a79cc Resources/CMake/BoostConfiguration.cmake
--- a/Resources/CMake/BoostConfiguration.cmake  Fri Jan 31 17:14:59 2020 +0100
+++ b/Resources/CMake/BoostConfiguration.cmake  Wed Feb 05 13:36:07 2020 +0000
@@ -32,7 +32,13 @@
 
   # Boost releases 1.44 through 1.47 supply both V2 and V3 filesystem
   # http://www.boost.org/doc/libs/1_46_1/libs/filesystem/v3/doc/index.htm
-  if (${Boost_VERSION} LESS 104400)
+  if(POLICY CMP0093)
+    set(BOOST144 1.44)
+  else()
+    set(BOOST144 104400)
+  endif()
+
+  if (${Boost_VERSION} LESS ${BOOST144})
     add_definitions(
       -DBOOST_HAS_FILESYSTEM_V3=0
       )
```
Comment 1 Sébastien Jodogne 2020-06-29 15:26:52 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2020-02-05.14:23:31]

Fix issue #166 (CMake find_boost version is now broken with newer boost/cmake)

→ https://hg.orthanc-server.com/orthanc/changeset/468181e2f090
Comment 2 Sébastien Jodogne 2020-06-29 15:26:53 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2020-02-05.14:23:41]

Thanks for the patch!