Commit 7056c153 by Maarten L. Hekkelman

Merge branch 'trunk' of github.com:PDB-REDO/libcifpp into trunk

parents 8539e050 5d4c2641
......@@ -44,10 +44,10 @@ endif(NOT SHARE_INSTALL_DIR)
set (Boost_DETAILED_FAILURE_MSG ON)
# set (BOOST_ROOT ${PROJECT_SOURCE_DIR}/../boost_1_75_0)
set (Boost_COMPILER "-vc")
# set (Boost_COMPILER "-vc")
# set (Boost_USE_STATIC_RUNTIME ON)
find_package(Boost 1.73.0 REQUIRED COMPONENTS system iostreams)
find_package(Boost 1.73.0 REQUIRED COMPONENTS system iostreams regex date_time)
set(CMAKE_THREAD_PREFER_PTHREAD)
set(THREADS_PREFER_PTHREAD_FLAG)
......@@ -93,9 +93,10 @@ set(project_headers
include_directories(
${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/src
)
)
add_library(${PROJECT_NAME} ${project_sources} ${project_headers})
add_executable(unit-test ${PROJECT_SOURCE_DIR}/test/unit-test.cpp)
configure_file(libcifpp.pc.in ${CMAKE_BINARY_DIR}/libcifpp.pc IMMEDIATE @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/libcifpp.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
......@@ -105,20 +106,35 @@ target_include_directories(${PROJECT_NAME} PUBLIC "${PROJECT_BINARY_DIR}")
# install(FILES ${CMAKE_BINARY_DIR}/Config.hpp DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME})
if(Boost_FOUND)
target_include_directories(${PROJECT_NAME} PUBLIC ${Boost_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES})
include_directories(${PROJECT_NAME} PUBLIC ${Boost_INCLUDE_DIRS})
link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES})
endif()
install(DIRECTORY include/cif++ DESTINATION ${INCLUDE_INSTALL_DIR})
install(FILES
${PROJECT_SOURCE_DIR}/rsrc/mmcif_ddl.dic
${PROJECT_SOURCE_DIR}/rsrc/mmcif_pdbx_v50.dic
DESTINATION ${SHARE_INSTALL_DIR}/libcifpp/
)
install(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
)
target_compile_definitions(${PROJECT_NAME}
PUBLIC "" CACHE_DIR="${SHARE_INSTALL_DIR}/libcifpp" DATA_DIR="${SHARE_INSTALL_DIR}/libcifpp" )
target_compile_definitions(unit-test
PUBLIC "" CACHE_DIR="${SHARE_INSTALL_DIR}/libcifpp" DATA_DIR="${SHARE_INSTALL_DIR}/libcifpp" )
target_link_libraries(unit-test ${PROJECT_NAME} ${Boost_LIBRARIES})
if(MSVC)
# Disable a MSVC warning type.
target_compile_options(cifpp PRIVATE /permissive-)
# make msvc standards compliant...
target_compile_options(${PROJECT_NAME} PRIVATE /permissive-)
target_compile_options(unit-test PRIVATE /permissive-)
endif()
......@@ -282,8 +282,6 @@ install: install-lib
install -d $(libdir)
$(LIBTOOL) --mode=install install $(LIB_TARGET) $(libdir)
install -d $(datadir)/libcifpp
install -m644 rsrc/isomers.txt $(datadir)/libcifpp;
gzip -f $(datadir)/libcifpp/isomers.txt
for d in mmcif_ddl.dic mmcif_pdbx_v50.dic; do \
install -m644 rsrc/$$d $(datadir)/libcifpp; \
gzip -f $(datadir)/libcifpp/$$d; \
......
......@@ -540,7 +540,7 @@ class CCP4CompoundFactoryImpl : public CompoundFactoryImpl
CCP4CompoundFactoryImpl::CCP4CompoundFactoryImpl(const fs::path &clibd_mon, CompoundFactoryImpl *next)
: CompoundFactoryImpl(next)
, mFile(clibd_mon / "list" / "mon_lib_list.cif")
, mFile((clibd_mon / "list" / "mon_lib_list.cif").string())
, mCLIBD_MON(clibd_mon)
{
const std::regex peptideRx("(?:[lmp]-)?peptide", std::regex::icase);
......@@ -580,7 +580,7 @@ Compound *CCP4CompoundFactoryImpl::create(const std::string &id)
if (fs::exists(resFile))
{
cif::File cf(resFile);
cif::File cf(resFile.string());
// locate the datablock
auto &db = cf["comp_" + id];
......
......@@ -182,8 +182,8 @@ struct Res
, mChainBreak(brk)
{
// update the box containing all atoms
mBox[0].mX = mBox[0].mY = mBox[0].mZ = std::numeric_limits<double>::max();
mBox[1].mX = mBox[1].mY = mBox[1].mZ = -std::numeric_limits<double>::max();
mBox[0].mX = mBox[0].mY = mBox[0].mZ = std::numeric_limits<float>::max();
mBox[1].mX = mBox[1].mY = mBox[1].mZ = -std::numeric_limits<float>::max();
mH = mmcif::Point{ std::numeric_limits<float>::max(), std::numeric_limits<float>::max(), std::numeric_limits<float>::max() };
......
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