Skip to content

Commit

Permalink
Fix writing version info
Browse files Browse the repository at this point in the history
  • Loading branch information
mhekkel committed Oct 7, 2024
1 parent 2830267 commit f30c6fa
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
cmake_minimum_required(VERSION 3.23)

# set the project name
project(mkdssp VERSION 4.4.7 LANGUAGES CXX)
project(mkdssp VERSION 4.4.8 LANGUAGES CXX)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

Expand Down
3 changes: 3 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Version 4.4.8
- Fix writing version numbers

Version 4.4.7
- Fix cmakefile to use system installed libraries by default

Expand Down
10 changes: 10 additions & 0 deletions libdssp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
# Use the version of the parent list file, if any. May need a fix someday.
if(NOT CMAKE_PARENT_LIST_FILE)
set(PROJECT_VERSION 4.4.8)
endif()

project(libdssp VERSION ${PROJECT_VERSION})

include(CMakePackageConfigHelpers)

# We do not want to write an export file for all our symbols...
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

# Create a revision file, containing the current git version info
write_version_header("${CMAKE_CURRENT_SOURCE_DIR}/src" LIB_NAME libdssp)

# The DSSP code is in a separate library, optionally to be used by others
add_library(dssp)
add_library(dssp::dssp ALIAS dssp)
Expand Down
6 changes: 3 additions & 3 deletions libdssp/src/dssp-io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void writeDSSP(const dssp &dssp, std::ostream &os)
std::time_t today = system_clock::to_time_t(system_clock::now());
std::tm *tm = std::gmtime(&today);

std::string version = kVersionNumber;
std::string version = klibdsspVersionNumber;
if (version.length() < 10)
version.insert(version.end(), 10 - version.length(), ' ');

Expand Down Expand Up @@ -879,8 +879,8 @@ void annotateDSSP(cif::datablock &db, const dssp &dssp, bool writeOther, bool wr
software.emplace({
{ "pdbx_ordinal", software.get_unique_id("") },
{ "name", "dssp" },
{ "version", kVersionNumber },
{ "date", kRevisionDate },
{ "version", klibdsspVersionNumber },
{ "date", klibdsspRevisionDate },
{ "classification", "model annotation" }
});
}

0 comments on commit f30c6fa

Please sign in to comment.