Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dssp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
dssp
Commits
dae8e82f
Unverified
Commit
dae8e82f
authored
Jan 25, 2022
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
version logic
parent
96dec418
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
12 deletions
+7
-12
CMakeLists.txt
+6
-9
src/dssp.cpp
+1
-3
No files found.
CMakeLists.txt
View file @
dae8e82f
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
cmake_minimum_required
(
VERSION 3.15
)
cmake_minimum_required
(
VERSION 3.15
)
# set the project name
# set the project name
project
(
mkdssp VERSION 4.0.
2
LANGUAGES CXX
)
project
(
mkdssp VERSION 4.0.
3
LANGUAGES CXX
)
list
(
APPEND CMAKE_MODULE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake"
)
list
(
APPEND CMAKE_MODULE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake"
)
...
@@ -97,14 +97,11 @@ endif()
...
@@ -97,14 +97,11 @@ endif()
# Create a revision file, containing the current git version info
# Create a revision file, containing the current git version info
include
(
GetGitRevisionDescription
)
include
(
GetGitRevisionDescription
)
option
(
GENERATE_CUSTOM_VERSION
"Generate a custom version string"
OFF
)
if
(
NOT
(
GIT-NOTFOUND OR HEAD-HASH-NOTFOUND
))
if
(
GIT-NOTFOUND OR HEAD-HASH-NOTFOUND OR NOT GENERATE_CUSTOM_VERSION
)
get_git_head_revision
(
REFSPEC COMMITHASH
)
get_git_head_revision
(
REFSPEC COMMITHASH
)
# Generate our own version string
# Generate our own version string
git_describe_working_tree
(
BUILD_VERSION_STRING --match=build --dirty
)
git_describe_working_tree
(
BUILD_VERSION_STRING --match=build --dirty
)
else
()
SET
(
BUILD_VERSION_STRING
${
PROJECT_VERSION
}
)
endif
()
endif
()
# generate version.h
# generate version.h
...
@@ -135,15 +132,15 @@ find_package(Threads)
...
@@ -135,15 +132,15 @@ find_package(Threads)
# Note: use -DBoost_USE_STATIC_LIBS=ON to use boost static libraries
# Note: use -DBoost_USE_STATIC_LIBS=ON to use boost static libraries
find_package
(
cifpp 2.0.0 REQUIRED
)
find_package
(
cifpp 2.0.0 REQUIRED
)
find_package
(
Boost COMPONENTS date_time
)
find_package
(
Boost COMPONENTS date_time
program_options
)
add_executable
(
mkdssp
add_executable
(
mkdssp
${
PROJECT_SOURCE_DIR
}
/src/dssp.cpp
${
PROJECT_SOURCE_DIR
}
/src/dssp.cpp
${
PROJECT_SOURCE_DIR
}
/src/dssp.hpp
${
PROJECT_SOURCE_DIR
}
/src/dssp.hpp
${
PROJECT_SOURCE_DIR
}
/src/mkdssp.cpp
)
${
PROJECT_SOURCE_DIR
}
/src/mkdssp.cpp
)
target_include_directories
(
mkdssp PRIVATE cifpp::cifpp
${
CMAKE_SOURCE_DIR
}
/include
${
cifpp_INCLUDE_DIRS
}
${
Boost_INCLUDE_DIRS
}
${
CMAKE_BINARY_DIR
}
)
target_include_directories
(
mkdssp PRIVATE cifpp::cifpp
${
CMAKE_SOURCE_DIR
}
/include
${
CMAKE_BINARY_DIR
}
)
target_link_libraries
(
mkdssp PRIVATE cifpp::cifpp Boost::date_time
Threads::Thread
s
)
target_link_libraries
(
mkdssp PRIVATE cifpp::cifpp Boost::date_time
Boost::program_option
s
)
if
(
USE_RSRC
)
if
(
USE_RSRC
)
mrc_target_resources
(
mkdssp
${
CIFPP_SHARE_DIR
}
/mmcif_pdbx_v50.dic
)
mrc_target_resources
(
mkdssp
${
CIFPP_SHARE_DIR
}
/mmcif_pdbx_v50.dic
)
...
@@ -178,7 +175,7 @@ target_include_directories(unit-test PRIVATE
...
@@ -178,7 +175,7 @@ target_include_directories(unit-test PRIVATE
${
CMAKE_CURRENT_SOURCE_DIR
}
/include
${
CMAKE_CURRENT_SOURCE_DIR
}
/include
)
)
target_link_libraries
(
unit-test
Threads::Threads
cifpp::cifpp Boost::date_time
)
target_link_libraries
(
unit-test cifpp::cifpp Boost::date_time
)
if
(
MSVC
)
if
(
MSVC
)
# Specify unwind semantics so that MSVC knowns how to handle exceptions
# Specify unwind semantics so that MSVC knowns how to handle exceptions
...
...
src/dssp.cpp
View file @
dae8e82f
...
@@ -71,9 +71,7 @@ void load_version_info()
...
@@ -71,9 +71,7 @@ void load_version_info()
if
(
std
::
regex_match
(
line
,
m
,
rxVersionNr
))
if
(
std
::
regex_match
(
line
,
m
,
rxVersionNr
))
{
{
gVersionNr
=
m
[
1
];
gVersionNr
+=
" (build "
+
m
[
1
].
str
()
+
(
m
[
2
].
matched
?
"*)"
:
")"
);
if
(
m
[
2
].
matched
)
gVersionNr
+=
'*'
;
continue
;
continue
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment