From 898dcea6956e1efce50e05b80f67dcea8c91e882 Mon Sep 17 00:00:00 2001 From: Evgueni Ovtchinnikov Date: Mon, 26 Jul 2021 07:50:51 +0000 Subject: [PATCH] sorted out de-boost build on linux, fixes #241 --- src/Synergistic/cSyn/tests/CMakeLists.txt | 2 +- src/common/CMakeLists.txt | 2 +- src/common/csirf.cpp | 13 ------------- src/common/iequals.cpp | 16 ++++++++++++++++ 4 files changed, 18 insertions(+), 15 deletions(-) create mode 100644 src/common/iequals.cpp diff --git a/src/Synergistic/cSyn/tests/CMakeLists.txt b/src/Synergistic/cSyn/tests/CMakeLists.txt index d52864aae..229cd9395 100644 --- a/src/Synergistic/cSyn/tests/CMakeLists.txt +++ b/src/Synergistic/cSyn/tests/CMakeLists.txt @@ -19,7 +19,7 @@ SET(CMAKE_POSITION_INDEPENDENT_CODE True) ADD_EXECUTABLE(test_conv_img test_conv_img.cpp ${STIR_REGISTRIES}) -TARGET_LINK_LIBRARIES(test_conv_img LINK_PUBLIC csirf iutilities cstir cgadgetron Reg csyn) +TARGET_LINK_LIBRARIES(test_conv_img LINK_PUBLIC cgadgetron csirf iutilities cstir Reg csyn) INSTALL(TARGETS test_conv_img DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) set(MR_vendor_dicom_as_nifti "${CMAKE_SOURCE_DIR}/data/examples/MR/zenodo/dicom_as_nifti.nii") diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 9246802cf..a5beacfcd 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -20,7 +20,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE True) set(cSIRF_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include") -add_library(csirf csirf.cpp ImageData.cpp GeometricalInfo.cpp) +add_library(csirf csirf.cpp ImageData.cpp GeometricalInfo.cpp iequals.cpp) target_include_directories(csirf PUBLIC "$$" ) diff --git a/src/common/csirf.cpp b/src/common/csirf.cpp index d3a224794..89d8c5f10 100644 --- a/src/common/csirf.cpp +++ b/src/common/csirf.cpp @@ -28,19 +28,6 @@ limitations under the License. #include "sirf/Syn/utilities.h" #include "sirf/common/deprecate.h" -namespace sirf { - bool iequals(const std::string& a, const std::string& b) - { - unsigned int n = a.size(); - if (b.size() != n) - return false; - for (unsigned int i = 0; i < n; i++) - if (tolower(a[i]) != tolower(b[i])) - return false; - return true; - } -} - using namespace sirf; #define NEW_OBJECT_HANDLE(T) new ObjectHandle(shared_ptr(new T)) diff --git a/src/common/iequals.cpp b/src/common/iequals.cpp new file mode 100644 index 000000000..074acacf7 --- /dev/null +++ b/src/common/iequals.cpp @@ -0,0 +1,16 @@ +#include +#include + +namespace sirf { + bool iequals(const std::string& a, const std::string& b) + { + unsigned int n = a.size(); + if (b.size() != n) + return false; + for (unsigned int i = 0; i < n; i++) + if (tolower(a[i]) != tolower(b[i])) + return false; + return true; + } +} +