Commit 681aa3bf by Maarten L. Hekkelman

clean up

parent a68e0534
...@@ -151,7 +151,7 @@ endif() ...@@ -151,7 +151,7 @@ endif()
# Start by finding out if std:regex is usable. Note that the current # Start by finding out if std:regex is usable. Note that the current
# implementation in GCC is not acceptable, it crashes on long lines. # implementation in GCC is not acceptable, it crashes on long lines.
try_run(STD_REGEX_RUNNING STD_REGEX_COMPILING try_run(STD_REGEX_RUNNING STD_REGEX_COMPILING
${CMAKE_CURRENT_BINARY_DIR}/test ${CMAKE_SOURCE_DIR}/cmake/test-rx.cpp) ${CMAKE_CURRENT_BINARY_DIR}/test ${PROJECT_SOURCE_DIR}/cmake/test-rx.cpp)
if(STD_REGEX_RUNNING STREQUAL FAILED_TO_RUN) if(STD_REGEX_RUNNING STREQUAL FAILED_TO_RUN)
message(WARNING "You are probably trying to compile using the g++ standard library which contains a crashing std::regex implementation. Will try to use boost::regex instead") message(WARNING "You are probably trying to compile using the g++ standard library which contains a crashing std::regex implementation. Will try to use boost::regex instead")
...@@ -214,8 +214,6 @@ set(project_headers ...@@ -214,8 +214,6 @@ set(project_headers
${PROJECT_SOURCE_DIR}/include/cif++/condition.hpp ${PROJECT_SOURCE_DIR}/include/cif++/condition.hpp
${PROJECT_SOURCE_DIR}/include/cif++/category.hpp ${PROJECT_SOURCE_DIR}/include/cif++/category.hpp
${PROJECT_SOURCE_DIR}/include/cif++/row.hpp ${PROJECT_SOURCE_DIR}/include/cif++/row.hpp
# ${PROJECT_SOURCE_DIR}/include/cif++/point.hpp
) )
add_library(cifpp ${project_sources} ${project_headers}) add_library(cifpp ${project_sources} ${project_headers})
...@@ -261,7 +259,7 @@ if(CIFPP_DOWNLOAD_CCD) ...@@ -261,7 +259,7 @@ if(CIFPP_DOWNLOAD_CCD)
SHOW_PROGRESS) SHOW_PROGRESS)
add_custom_command(OUTPUT ${COMPONENTS_CIF} add_custom_command(OUTPUT ${COMPONENTS_CIF}
COMMAND ${GUNZIP} ${COMPONENTS_CIF}.gz COMMAND ${GUNZIP} ${COMPONENTS_CIF}.gz
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/data/) WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/data/)
else() else()
file(DOWNLOAD ftp://ftp.wwpdb.org/pub/pdb/data/monomers/components.cif ${COMPONENTS_CIF} file(DOWNLOAD ftp://ftp.wwpdb.org/pub/pdb/data/monomers/components.cif ${COMPONENTS_CIF}
SHOW_PROGRESS) SHOW_PROGRESS)
...@@ -385,7 +383,7 @@ if(CIFPP_BUILD_TESTS) ...@@ -385,7 +383,7 @@ if(CIFPP_BUILD_TESTS)
target_link_libraries(${CIFPP_TEST} PRIVATE Threads::Threads cifpp::cifpp Boost::boost) 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.dic) mrc_target_resources(${CIFPP_TEST} ${PROJECT_SOURCE_DIR}/rsrc/mmcif_pdbx.dic)
endif() endif()
if(MSVC) if(MSVC)
...@@ -397,10 +395,10 @@ if(CIFPP_BUILD_TESTS) ...@@ -397,10 +395,10 @@ if(CIFPP_BUILD_TESTS)
add_custom_command( add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Run${CIFPP_TEST}.touch OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Run${CIFPP_TEST}.touch
COMMAND $<TARGET_FILE:${CIFPP_TEST}> -- ${CMAKE_SOURCE_DIR}/test) COMMAND $<TARGET_FILE:${CIFPP_TEST}> -- ${PROJECT_SOURCE_DIR}/test)
add_test(NAME ${CIFPP_TEST} add_test(NAME ${CIFPP_TEST}
COMMAND $<TARGET_FILE:${CIFPP_TEST}> -- ${CMAKE_SOURCE_DIR}/test) COMMAND $<TARGET_FILE:${CIFPP_TEST}> -- ${PROJECT_SOURCE_DIR}/test)
endforeach() endforeach()
endif() endif()
...@@ -410,7 +408,7 @@ message("Will install in ${CMAKE_INSTALL_PREFIX}") ...@@ -410,7 +408,7 @@ message("Will install in ${CMAKE_INSTALL_PREFIX}")
if(CIFPP_INSTALL_UPDATE_SCRIPT) if(CIFPP_INSTALL_UPDATE_SCRIPT)
set(CIFPP_CRON_DIR "$ENV{DESTDIR}/etc/cron.weekly") set(CIFPP_CRON_DIR "$ENV{DESTDIR}/etc/cron.weekly")
configure_file(${CMAKE_SOURCE_DIR}/tools/update-libcifpp-data.in update-libcifpp-data @ONLY) configure_file(${PROJECT_SOURCE_DIR}/tools/update-libcifpp-data.in update-libcifpp-data @ONLY)
install( install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/update-libcifpp-data FILES ${CMAKE_CURRENT_BINARY_DIR}/update-libcifpp-data
DESTINATION ${CIFPP_CRON_DIR} DESTINATION ${CIFPP_CRON_DIR}
......
...@@ -26,11 +26,7 @@ ...@@ -26,11 +26,7 @@
#pragma once #pragma once
// #include <cmath>
#include <filesystem> #include <filesystem>
// #include <set>
// #include <sstream>
// #include <vector>
#ifndef STDOUT_FILENO #ifndef STDOUT_FILENO
#define STDOUT_FILENO 1 #define STDOUT_FILENO 1
......
#!/bin/bash
set -e
file="$1"
echo -n "[["
while IFS= read -r line; do
echo $line | sed -e 's/\[/@<:@/g' -e 's/\]/@:>@/g' -e 's/#/@%:@/g' -e 's/\$/@S|@/g'
echo
done < "$file"
echo -n "]]"
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