Mercurial > hg > orthanc
comparison Resources/CMake/BoostConfiguration.cmake @ 2878:320a877a1f40
making the boost patch mandatory
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 12 Oct 2018 14:37:54 +0200 |
parents | 64e3d4ab158d |
children | ab03dae59d6e |
comparison
equal
deleted
inserted
replaced
2877:fae500411605 | 2878:320a877a1f40 |
---|---|
68 | 68 |
69 DownloadPackage(${BOOST_MD5} ${BOOST_URL} "${BOOST_SOURCES_DIR}") | 69 DownloadPackage(${BOOST_MD5} ${BOOST_URL} "${BOOST_SOURCES_DIR}") |
70 | 70 |
71 | 71 |
72 ## | 72 ## |
73 ## Patching boost | |
74 ## | |
75 | |
76 execute_process( | |
77 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i | |
78 ${ORTHANC_ROOT}/Resources/Patches/boost-${BOOST_VERSION}-linux-standard-base.patch | |
79 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | |
80 RESULT_VARIABLE Failure | |
81 ) | |
82 | |
83 if (FirstRun AND Failure) | |
84 message(FATAL_ERROR "Error while patching a file") | |
85 endif() | |
86 | |
87 | |
88 ## | |
73 ## Generic configuration of Boost | 89 ## Generic configuration of Boost |
74 ## | 90 ## |
75 | 91 |
76 if (CMAKE_COMPILER_IS_GNUCXX) | 92 if (CMAKE_COMPILER_IS_GNUCXX) |
77 add_definitions(-isystem ${BOOST_SOURCES_DIR}) | 93 add_definitions(-isystem ${BOOST_SOURCES_DIR}) |
100 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase" OR | 116 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase" OR |
101 "${CMAKE_SYSTEM_NAME}" STREQUAL "Android") | 117 "${CMAKE_SYSTEM_NAME}" STREQUAL "Android") |
102 add_definitions( | 118 add_definitions( |
103 -DBOOST_SYSTEM_USE_STRERROR=1 | 119 -DBOOST_SYSTEM_USE_STRERROR=1 |
104 ) | 120 ) |
105 | |
106 execute_process( | |
107 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i | |
108 ${ORTHANC_ROOT}/Resources/Patches/boost-${BOOST_VERSION}-linux-standard-base.patch | |
109 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | |
110 RESULT_VARIABLE Failure | |
111 ) | |
112 | |
113 if (FirstRun AND Failure) | |
114 message(FATAL_ERROR "Error while patching a file") | |
115 endif() | |
116 endif() | 121 endif() |
117 | 122 |
118 | 123 |
119 ## | 124 ## |
120 ## Configuration of boost::thread | 125 ## Configuration of boost::thread |