Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libcifpp
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
libcifpp
Commits
b3dc38f2
Unverified
Commit
b3dc38f2
authored
Nov 02, 2023
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update for WIN32
parent
6044d3dc
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
34 deletions
+16
-34
CMakeLists.txt
+5
-4
cmake/VersionString.cmake
+4
-0
cmake/revision.hpp.in
+6
-24
include/cif++/file.hpp
+0
-1
include/cif++/forward_decl.hpp
+0
-2
include/cif++/point.hpp
+0
-2
test/format-test.cpp
+1
-1
No files found.
CMakeLists.txt
View file @
b3dc38f2
...
@@ -125,7 +125,8 @@ endif()
...
@@ -125,7 +125,8 @@ endif()
if
(
MSVC
)
if
(
MSVC
)
# make msvc standards compliant...
# make msvc standards compliant...
add_compile_options
(
/permissive-
)
add_compile_options
(
/permissive- /bigobj
)
add_link_options
(
/NODEFAULTLIB:library
)
if
(
BUILD_SHARED_LIBS
)
if
(
BUILD_SHARED_LIBS
)
set
(
CMAKE_MSVC_RUNTIME_LIBRARY
"MultiThreaded$<$<CONFIG:Debug>:Debug>DLL"
)
set
(
CMAKE_MSVC_RUNTIME_LIBRARY
"MultiThreaded$<$<CONFIG:Debug>:Debug>DLL"
)
...
@@ -297,11 +298,11 @@ set_target_properties(cifpp PROPERTIES POSITION_INDEPENDENT_CODE ON)
...
@@ -297,11 +298,11 @@ set_target_properties(cifpp PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories
(
cifpp
target_include_directories
(
cifpp
PUBLIC
PUBLIC
"$<BUILD_INTERFACE:
${
PROJECT_SOURCE_DIR
}
/include;
${
PROJECT_BINARY_DIR
}
;
${
EIGEN3_INCLUDE_DIR
}
>"
"$<BUILD_INTERFACE:
${
PROJECT_SOURCE_DIR
}
/include;
${
PROJECT_BINARY_DIR
}
>"
"$<INSTALL_INTERFACE:
${
CMAKE_INSTALL_INCLUDEDIR
}
>"
"$<INSTALL_INTERFACE:
${
CMAKE_INSTALL_INCLUDEDIR
}
>"
)
)
target_link_libraries
(
cifpp PUBLIC Threads::Threads ZLIB::ZLIB
${
CIFPP_REQUIRED_LIBRARIES
}
)
target_link_libraries
(
cifpp PUBLIC Threads::Threads ZLIB::ZLIB
${
CIFPP_REQUIRED_LIBRARIES
}
PRIVATE Eigen3::Eigen
)
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"AppleClang"
)
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"AppleClang"
)
target_link_options
(
cifpp PRIVATE -undefined dynamic_lookup
)
target_link_options
(
cifpp PRIVATE -undefined dynamic_lookup
)
...
@@ -344,7 +345,7 @@ install(TARGETS cifpp
...
@@ -344,7 +345,7 @@ install(TARGETS cifpp
if
(
MSVC AND BUILD_SHARED_LIBS
)
if
(
MSVC AND BUILD_SHARED_LIBS
)
install
(
install
(
FILES $<TARGET_PDB_FILE:
${
PROJECT_NAME
}
>
FILES $<TARGET_PDB_FILE:
cifpp
>
DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
OPTIONAL
)
OPTIONAL
)
endif
()
endif
()
...
...
cmake/VersionString.cmake
View file @
b3dc38f2
...
@@ -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 @
b3dc38f2
...
@@ -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
include/cif++/file.hpp
View file @
b3dc38f2
...
@@ -28,7 +28,6 @@
...
@@ -28,7 +28,6 @@
#include <list>
#include <list>
#include "cif++/exports.hpp"
#include "cif++/datablock.hpp"
#include "cif++/datablock.hpp"
#include "cif++/parser.hpp"
#include "cif++/parser.hpp"
...
...
include/cif++/forward_decl.hpp
View file @
b3dc38f2
...
@@ -26,8 +26,6 @@
...
@@ -26,8 +26,6 @@
#pragma once
#pragma once
#include "cif++/exports.hpp"
#include <string>
#include <string>
#include <vector>
#include <vector>
...
...
include/cif++/point.hpp
View file @
b3dc38f2
...
@@ -26,8 +26,6 @@
...
@@ -26,8 +26,6 @@
#pragma once
#pragma once
#include "cif++/exports.hpp"
#include <array>
#include <array>
#include <cmath>
#include <cmath>
#include <complex>
#include <complex>
...
...
test/format-test.cpp
View file @
b3dc38f2
...
@@ -90,7 +90,7 @@ BOOST_AUTO_TEST_CASE(clr_1)
...
@@ -90,7 +90,7 @@ BOOST_AUTO_TEST_CASE(clr_1)
{
{
using
namespace
cif
::
colour
;
using
namespace
cif
::
colour
;
std
::
cout
<<
"Hello, "
<<
cif
::
coloured
(
"world!"
,
white
,
red
,
regular
)
<<
'\n'
std
::
cout
<<
"Hello, "
<<
cif
::
coloured
(
"world!"
,
white
,
red
,
cif
::
colour
::
regular
)
<<
'\n'
<<
"Hello, "
<<
cif
::
coloured
(
"world!"
,
white
,
red
,
bold
)
<<
'\n'
<<
"Hello, "
<<
cif
::
coloured
(
"world!"
,
white
,
red
,
bold
)
<<
'\n'
<<
"Hello, "
<<
cif
::
coloured
(
"world!"
,
black
,
red
)
<<
'\n'
<<
"Hello, "
<<
cif
::
coloured
(
"world!"
,
black
,
red
)
<<
'\n'
<<
"Hello, "
<<
cif
::
coloured
(
"world!"
,
white
,
green
)
<<
'\n'
<<
"Hello, "
<<
cif
::
coloured
(
"world!"
,
white
,
green
)
<<
'\n'
...
...
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