Commit 5758bfba by Maarten L. Hekkelman

Required changes for FreeBSD

parent 8d3a0797
...@@ -260,17 +260,20 @@ add_library(cifpp::cifpp ALIAS cifpp) ...@@ -260,17 +260,20 @@ add_library(cifpp::cifpp ALIAS cifpp)
set_target_properties(cifpp PROPERTIES POSITION_INDEPENDENT_CODE ON) set_target_properties(cifpp PROPERTIES POSITION_INDEPENDENT_CODE ON)
# if(NEED_BOOST_REGEX) if(BOOST_REGEX_STANDALONE)
target_compile_definitions(cifpp PUBLIC USE_BOOST_REGEX=1 BOOST_REGEX_STANDALONE=1) target_compile_definitions(cifpp PUBLIC USE_BOOST_REGEX=1 BOOST_REGEX_STANDALONE=1)
endif()
# endif()
target_include_directories(cifpp target_include_directories(cifpp
PUBLIC PUBLIC
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>" "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>" "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
) )
target_link_libraries(cifpp PUBLIC Threads::Threads gxrio::gxrio ${CIFPP_REQUIRED_LIBRARIES} PRIVATE Boost::regex) target_link_libraries(cifpp PUBLIC Threads::Threads gxrio::gxrio ${CIFPP_REQUIRED_LIBRARIES})
if(BOOST_REGEX_STANDALONE)
target_link_libraries(cifpp PRIVATE Boost::regex)
endif()
# target_link_libraries(cifpp PRIVATE) # target_link_libraries(cifpp PRIVATE)
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
...@@ -409,6 +412,8 @@ option(CIFPP_BUILD_TESTS "Build test exectuables" OFF) ...@@ -409,6 +412,8 @@ option(CIFPP_BUILD_TESTS "Build test exectuables" OFF)
if(CIFPP_BUILD_TESTS) if(CIFPP_BUILD_TESTS)
enable_testing() enable_testing()
find_package(Boost REQUIRED)
list(APPEND CIFPP_tests list(APPEND CIFPP_tests
# pdb2cif # pdb2cif
...@@ -424,7 +429,7 @@ if(CIFPP_BUILD_TESTS) ...@@ -424,7 +429,7 @@ if(CIFPP_BUILD_TESTS)
add_executable(${CIFPP_TEST} ${CIFPP_TEST_SOURCE}) add_executable(${CIFPP_TEST} ${CIFPP_TEST_SOURCE})
target_link_libraries(${CIFPP_TEST} PRIVATE Threads::Threads cifpp::cifpp) target_link_libraries(${CIFPP_TEST} PRIVATE Threads::Threads cifpp::cifpp Boost::boost)
if(CIFPP_USE_RSRC) if(CIFPP_USE_RSRC)
mrc_target_resources(${CIFPP_TEST} ${CMAKE_SOURCE_DIR}/rsrc/mmcif_pdbx_v50.dic) mrc_target_resources(${CIFPP_TEST} ${CMAKE_SOURCE_DIR}/rsrc/mmcif_pdbx_v50.dic)
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#pragma once #pragma once
#include <array>
#include <cif++/cif/forward_decl.hpp> #include <cif++/cif/forward_decl.hpp>
#include <cif++/cif/condition.hpp> #include <cif++/cif/condition.hpp>
...@@ -660,4 +662,4 @@ class category ...@@ -660,4 +662,4 @@ class category
row *m_head = nullptr, *m_tail = nullptr; row *m_head = nullptr, *m_tail = nullptr;
}; };
} // namespace cif } // namespace cif
\ No newline at end of file
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#pragma once #pragma once
#include <map>
#include <cif++/cif/row.hpp> #include <cif++/cif/row.hpp>
namespace cif namespace cif
...@@ -63,7 +65,7 @@ class sac_parser ...@@ -63,7 +65,7 @@ class sac_parser
kAnyPrintMask = 1 << 3 kAnyPrintMask = 1 << 3
}; };
static constexpr bool is_white(int ch) static bool is_white(int ch)
{ {
return std::isspace(ch) or ch == '#'; return std::isspace(ch) or ch == '#';
} }
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <cmath> #include <cmath>
#include <filesystem> #include <filesystem>
#include <set> #include <set>
#include <sstream>
#include <vector> #include <vector>
#ifndef STDOUT_FILENO #ifndef STDOUT_FILENO
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment