diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f5d4b68..0132f903 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,6 @@ include_directories(lib) include_directories(lib/3di) include_directories(lib/pulchra) include_directories(lib/kerasify) -include_directories(lib/gemmi) set(ENV{CARGO_NET_OFFLINE} true) add_subdirectory(lib/corrosion) diff --git a/src/strucclustutils/CMakeLists.txt b/src/strucclustutils/CMakeLists.txt index 7bdafbb5..4d9ce715 100644 --- a/src/strucclustutils/CMakeLists.txt +++ b/src/strucclustutils/CMakeLists.txt @@ -20,7 +20,7 @@ set(strucclustutils_source_files PARENT_SCOPE ) -add_library(gemmiwrapper OBJECT +add_library(gemmiwrapper GemmiWrapper.cpp GemmiWrapper.h ) @@ -34,4 +34,5 @@ set_property(TARGET gemmiwrapper APPEND PROPERTY COMPILE_DEFINITIONS ${DEF_TMP}) set_property(TARGET gemmiwrapper APPEND PROPERTY INCLUDE_DIRECTORIES ${INCL_TMP}) restore_exceptions(gemmiwrapper) target_link_libraries(gemmiwrapper foldcomp) +target_include_directories(gemmiwrapper PRIVATE ../../lib/gemmi) target_include_directories(gemmiwrapper PRIVATE ../../lib/foldcomp/src) diff --git a/src/strucclustutils/GemmiWrapper.cpp b/src/strucclustutils/GemmiWrapper.cpp index b35bc687..c638e653 100644 --- a/src/strucclustutils/GemmiWrapper.cpp +++ b/src/strucclustutils/GemmiWrapper.cpp @@ -143,7 +143,7 @@ bool GemmiWrapper::load(const std::string& filename, Format format) { st = gemmi::read_pdb(infile); } updateStructure((void*) &st, filename, entity_to_tax_id); - } catch (std::runtime_error& e) { + } catch (...) { return false; } return true; @@ -240,7 +240,7 @@ bool GemmiWrapper::loadFromBuffer(const char * buffer, size_t bufferSize, const return false; } updateStructure((void*) &st, name, entity_to_tax_id); - } catch (std::runtime_error& e) { + } catch (...) { return false; } return true;