Compare commits

...

7 Commits

Author SHA1 Message Date
Maarten L. Hekkelman
41b4bdb90e update changelog 2024-11-19 08:57:00 +01:00
Maarten L. Hekkelman
af73cb3ad3 Version bump 2024-11-18 08:09:01 +01:00
Maarten L. Hekkelman
240b631963 Merge branch 'trunk' into develop 2024-11-18 08:08:30 +01:00
Maarten L. Hekkelman
c2a747af8c Fix remark 3 parser 2024-11-18 08:07:15 +01:00
Maarten L. Hekkelman
5959647826 three way comparison for point 2024-11-04 09:25:51 +01:00
Maarten L. Hekkelman
9542e211bc avoid cmake errors in windows? 2024-10-15 08:56:34 +02:00
Maarten L. Hekkelman
d07890db7f Set target property CIFPP_DATA_DIR 2024-10-07 11:24:10 +02:00
5 changed files with 28 additions and 5 deletions

View File

@@ -27,7 +27,7 @@ cmake_minimum_required(VERSION 3.23)
# set the project name
project(
libcifpp
VERSION 7.0.6
VERSION 7.0.8
LANGUAGES CXX)
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
@@ -440,6 +440,7 @@ endif()
if(CIFPP_DATA_DIR)
target_compile_definitions(cifpp PUBLIC DATA_DIR="${CIFPP_DATA_DIR}")
set_target_properties(cifpp PROPERTIES CIFPP_DATA_DIR ${CIFPP_DATA_DIR})
endif()
if(NOT PROJECT_IS_TOP_LEVEL)

View File

@@ -1,3 +1,11 @@
Version 7.0.8
- Fix PDB Remark 3 parser
- Added three way comparison for point
Version 7.0.7
- Set CIFPP_DATA_DIR on target cifpp for use in projects that include
libcifpp directly
Version 7.0.6
- Fix linking to std::atomic

View File

@@ -662,12 +662,23 @@ struct point_type
return std::make_tuple(std::ref(m_x), std::ref(m_y), std::ref(m_z));
}
/// \brief Compare with @a rhs
#if defined(__cpp_impl_three_way_comparison)
/// \brief a default spaceship operator
constexpr auto operator<=>(const point_type &rhs) const = default;
#else
/// \brief a default equals operator
constexpr bool operator==(const point_type &rhs) const
{
return m_x == rhs.m_x and m_y == rhs.m_y and m_z == rhs.m_z;
}
/// \brief a default not-equals operator
constexpr bool operator!=(const point_type &rhs) const
{
return not operator==(rhs);
}
#endif
// consider point as a vector... perhaps I should rename point?
/// \brief looking at the point as if it is a vector, return the squared length

View File

@@ -1480,6 +1480,9 @@ bool Remark3Parser::parse(const std::string &expMethod, PDBRecord *r, cif::datab
for (auto &cat1 : best.parser->mDb)
{
if (cat1.empty())
continue;
auto &cat2 = db[cat1.name()];
// copy only the values in the first row for the following categories

View File

@@ -34,10 +34,10 @@ add_library(test-main OBJECT "${CMAKE_CURRENT_SOURCE_DIR}/test-main.cpp")
target_link_libraries(test-main cifpp::cifpp Catch2::Catch2)
if(${Catch2_VERSION} VERSION_GREATER_EQUAL 3.0.0)
target_compile_definitions(test-main PUBLIC CATCH22=0)
else()
if("${Catch2_VERSION}" VERSION_LESS 3.0.0)
target_compile_definitions(test-main PUBLIC CATCH22=1)
else()
target_compile_definitions(test-main PUBLIC CATCH22=0)
endif()
foreach(CIFPP_TEST IN LISTS CIFPP_tests)