Commit 5758bfba by Maarten L. Hekkelman

Required changes for FreeBSD

parent 8d3a0797
......@@ -260,17 +260,20 @@ add_library(cifpp::cifpp ALIAS cifpp)
set_target_properties(cifpp PROPERTIES POSITION_INDEPENDENT_CODE ON)
# if(NEED_BOOST_REGEX)
target_compile_definitions(cifpp PUBLIC USE_BOOST_REGEX=1 BOOST_REGEX_STANDALONE=1)
if(BOOST_REGEX_STANDALONE)
target_compile_definitions(cifpp PUBLIC USE_BOOST_REGEX=1 BOOST_REGEX_STANDALONE=1)
endif()
# endif()
target_include_directories(cifpp
PUBLIC
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
"$<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)
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
......@@ -409,6 +412,8 @@ option(CIFPP_BUILD_TESTS "Build test exectuables" OFF)
if(CIFPP_BUILD_TESTS)
enable_testing()
find_package(Boost REQUIRED)
list(APPEND CIFPP_tests
# pdb2cif
......@@ -424,7 +429,7 @@ if(CIFPP_BUILD_TESTS)
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)
mrc_target_resources(${CIFPP_TEST} ${CMAKE_SOURCE_DIR}/rsrc/mmcif_pdbx_v50.dic)
......
......@@ -26,6 +26,8 @@
#pragma once
#include <array>
#include <cif++/cif/forward_decl.hpp>
#include <cif++/cif/condition.hpp>
......@@ -660,4 +662,4 @@ class category
row *m_head = nullptr, *m_tail = nullptr;
};
} // namespace cif
\ No newline at end of file
} // namespace cif
......@@ -26,6 +26,8 @@
#pragma once
#include <map>
#include <cif++/cif/row.hpp>
namespace cif
......@@ -63,7 +65,7 @@ class sac_parser
kAnyPrintMask = 1 << 3
};
static constexpr bool is_white(int ch)
static bool is_white(int ch)
{
return std::isspace(ch) or ch == '#';
}
......
......@@ -30,6 +30,7 @@
#include <cmath>
#include <filesystem>
#include <set>
#include <sstream>
#include <vector>
#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