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
cded8443
Unverified
Commit
cded8443
authored
Nov 02, 2023
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update for WIN32
parent
ad317afe
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
27 deletions
+22
-27
CMakeLists.txt
+1
-1
cmake/VersionString.cmake
+4
-0
cmake/revision.hpp.in
+6
-24
libdssp/CMakeLists.txt
+7
-2
libdssp/src/dssp.cpp
+4
-0
No files found.
CMakeLists.txt
View file @
cded8443
...
@@ -35,7 +35,6 @@ include(CheckIncludeFiles)
...
@@ -35,7 +35,6 @@ include(CheckIncludeFiles)
include
(
CheckLibraryExists
)
include
(
CheckLibraryExists
)
include
(
CMakePackageConfigHelpers
)
include
(
CMakePackageConfigHelpers
)
include
(
FindFilesystem
)
include
(
FindFilesystem
)
include
(
GenerateExportHeader
)
include
(
CTest
)
include
(
CTest
)
set
(
CXX_EXTENSIONS OFF
)
set
(
CXX_EXTENSIONS OFF
)
...
@@ -71,6 +70,7 @@ endif()
...
@@ -71,6 +70,7 @@ endif()
if
(
MSVC
)
if
(
MSVC
)
# make msvc standards compliant...
# make msvc standards compliant...
add_compile_options
(
/permissive-
)
add_compile_options
(
/permissive-
)
add_link_options
(
/NODEFAULTLIB:library
)
macro
(
get_WIN32_WINNT version
)
macro
(
get_WIN32_WINNT version
)
if
(
WIN32 AND CMAKE_SYSTEM_VERSION
)
if
(
WIN32 AND CMAKE_SYSTEM_VERSION
)
...
...
cmake/VersionString.cmake
View file @
cded8443
...
@@ -237,7 +237,11 @@ function(write_version_header dir)
...
@@ -237,7 +237,11 @@ function(write_version_header dir)
if
(
res EQUAL 0
)
if
(
res EQUAL 0
)
set
(
REVISION_STRING
"
${
out
}
"
)
set
(
REVISION_STRING
"
${
out
}
"
)
else
()
message
(
STATUS
"Git hash not found, does this project has a 'build' tag?"
)
endif
()
endif
()
else
()
message
(
STATUS
"Git hash not found"
)
endif
()
endif
()
# Check the revision string, if it matches we fill in the required info
# Check the revision string, if it matches we fill in the required info
...
...
cmake/revision.hpp.in
View file @
cded8443
...
@@ -29,7 +29,7 @@ class version_info_base
...
@@ -29,7 +29,7 @@ class version_info_base
{
{
for (auto lib = registered_libraries(); lib != nullptr; lib = lib->m_next)
for (auto lib = registered_libraries(); lib != nullptr; lib = lib->m_next)
{
{
os <<
'-' << std::endl
;
os <<
"-\n"
;
lib->write(os, verbose);
lib->write(os, verbose);
}
}
}
}
...
@@ -55,15 +55,15 @@ class version_info_base
...
@@ -55,15 +55,15 @@ class version_info_base
void write(std::ostream &os, bool verbose)
void write(std::ostream &os, bool verbose)
{
{
os << m_name << " version " << m_version <<
std::endl
;
os << m_name << " version " << m_version <<
'\n'
;
if (verbose)
if (verbose)
{
{
if (m_build_number != 0)
if (m_build_number != 0)
{
{
os << "build: " << m_build_number << ' ' << m_revision_date <<
std::endl
;
os << "build: " << m_build_number << ' ' << m_revision_date <<
'\n'
;
if (m_git_tag[0] != 0)
if (m_git_tag[0] != 0)
os << "git tag: " << m_git_tag <<
std::endl
;
os << "git tag: " << m_git_tag <<
'\n'
;
}
}
}
}
}
}
...
@@ -100,25 +100,8 @@ class version_info : public version_info_base
...
@@ -100,25 +100,8 @@ class version_info : public version_info_base
: version_info_base(name, version, build_number, git_tag, revision_date, is_main)
: version_info_base(name, version, build_number, git_tag, revision_date, is_main)
{
{
}
}
struct register_object
{
register_object()
{
static implementation_type s_instance;
}
};
template <register_object &>
struct reference_object;
static register_object s_registered_object;
static reference_object<s_registered_object> s_referenced_object;
};
};
template <typename T>
typename version_info<T>::register_object version_info<T>::s_registered_object;
} // namespace version_info_v1_1
} // namespace version_info_v1_1
inline void write_version_string(std::ostream &os, bool verbose)
inline void write_version_string(std::ostream &os, bool verbose)
...
@@ -128,11 +111,11 @@ inline void write_version_string(std::ostream &os, bool verbose)
...
@@ -128,11 +111,11 @@ inline void write_version_string(std::ostream &os, bool verbose)
#endif
#endif
class version_info_@IDENT_PREFIX@impl : public version_info_v1_1::version_info<version_info_@IDENT_PREFIX@impl>
c
onst c
lass version_info_@IDENT_PREFIX@impl : public version_info_v1_1::version_info<version_info_@IDENT_PREFIX@impl>
{
{
public:
public:
version_info_@IDENT_PREFIX@impl()
version_info_@IDENT_PREFIX@impl()
: version_info(k@VAR_PREFIX@ProjectName, k@VAR_PREFIX@VersionNumber, k@VAR_PREFIX@BuildNumber, k@VAR_PREFIX@RevisionGitTag, k@VAR_PREFIX@RevisionDate, @BOOL_IS_MAIN@)
: version_info(k@VAR_PREFIX@ProjectName, k@VAR_PREFIX@VersionNumber, k@VAR_PREFIX@BuildNumber, k@VAR_PREFIX@RevisionGitTag, k@VAR_PREFIX@RevisionDate, @BOOL_IS_MAIN@)
{
{
}
}
};
} s_version_info_@IDENT_PREFIX@instance;
\ No newline at end of file
libdssp/CMakeLists.txt
View file @
cded8443
...
@@ -35,7 +35,6 @@ include(CheckIncludeFiles)
...
@@ -35,7 +35,6 @@ include(CheckIncludeFiles)
include
(
CheckLibraryExists
)
include
(
CheckLibraryExists
)
include
(
CMakePackageConfigHelpers
)
include
(
CMakePackageConfigHelpers
)
include
(
FindFilesystem
)
include
(
FindFilesystem
)
include
(
GenerateExportHeader
)
set
(
CXX_EXTENSIONS OFF
)
set
(
CXX_EXTENSIONS OFF
)
set
(
CMAKE_CXX_STANDARD 17
)
set
(
CMAKE_CXX_STANDARD 17
)
...
@@ -69,6 +68,7 @@ endif()
...
@@ -69,6 +68,7 @@ endif()
if
(
MSVC
)
if
(
MSVC
)
# make msvc standards compliant...
# make msvc standards compliant...
add_compile_options
(
/permissive-
)
add_compile_options
(
/permissive-
)
add_link_options
(
/NODEFAULTLIB:library
)
macro
(
get_WIN32_WINNT version
)
macro
(
get_WIN32_WINNT version
)
if
(
WIN32 AND CMAKE_SYSTEM_VERSION
)
if
(
WIN32 AND CMAKE_SYSTEM_VERSION
)
...
@@ -84,6 +84,9 @@ if(MSVC)
...
@@ -84,6 +84,9 @@ if(MSVC)
add_definitions
(
-D_WIN32_WINNT=
${
ver
}
)
add_definitions
(
-D_WIN32_WINNT=
${
ver
}
)
endif
()
endif
()
# 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
# Create a revision file, containing the current git version info
include
(
VersionString
)
include
(
VersionString
)
write_version_header
(
"
${
PROJECT_SOURCE_DIR
}
/src"
LIB_NAME
"libdssp"
)
write_version_header
(
"
${
PROJECT_SOURCE_DIR
}
/src"
LIB_NAME
"libdssp"
)
...
@@ -111,6 +114,8 @@ add_library(dssp::dssp ALIAS dssp)
...
@@ -111,6 +114,8 @@ add_library(dssp::dssp ALIAS dssp)
target_link_libraries
(
dssp PUBLIC cifpp::cifpp
)
target_link_libraries
(
dssp PUBLIC cifpp::cifpp
)
set_target_properties
(
dssp PROPERTIES POSITION_INDEPENDENT_CODE ON
)
target_include_directories
(
dssp
target_include_directories
(
dssp
PUBLIC
PUBLIC
"$<BUILD_INTERFACE:
${
PROJECT_SOURCE_DIR
}
/include>"
"$<BUILD_INTERFACE:
${
PROJECT_SOURCE_DIR
}
/include>"
...
@@ -127,7 +132,7 @@ install(TARGETS dssp
...
@@ -127,7 +132,7 @@ install(TARGETS dssp
if
(
MSVC AND BUILD_SHARED_LIBS
)
if
(
MSVC AND BUILD_SHARED_LIBS
)
install
(
install
(
FILES $<TARGET_PDB_FILE:
${
PROJECT_NAME
}
>
FILES $<TARGET_PDB_FILE:
dssp
>
DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
OPTIONAL
)
OPTIONAL
)
endif
()
endif
()
...
...
libdssp/src/dssp.cpp
View file @
cded8443
...
@@ -35,6 +35,10 @@
...
@@ -35,6 +35,10 @@
#include <numeric>
#include <numeric>
#include <thread>
#include <thread>
#ifdef near
#undef near
#endif
using
residue
=
dssp
::
residue
;
using
residue
=
dssp
::
residue
;
using
statistics
=
dssp
::
statistics
;
using
statistics
=
dssp
::
statistics
;
using
structure_type
=
dssp
::
structure_type
;
using
structure_type
=
dssp
::
structure_type
;
...
...
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