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
640552ab
Unverified
Commit
640552ab
authored
Nov 22, 2023
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dependency on libzeep
parent
faee1848
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
22 deletions
+35
-22
CMakeLists.txt
+0
-6
README.md
+0
-3
cmake/cifppConfig.cmake.in
+1
-8
include/cif++/text.hpp
+34
-5
No files found.
CMakeLists.txt
View file @
640552ab
...
@@ -222,12 +222,6 @@ list(APPEND CIFPP_REQUIRED_LIBRARIES ${STDCPPFS_LIBRARY})
...
@@ -222,12 +222,6 @@ list(APPEND CIFPP_REQUIRED_LIBRARIES ${STDCPPFS_LIBRARY})
include
(
FindAtomic
)
include
(
FindAtomic
)
list
(
APPEND CIFPP_REQUIRED_LIBRARIES
${
STDCPPATOMIC_LIBRARY
}
)
list
(
APPEND CIFPP_REQUIRED_LIBRARIES
${
STDCPPATOMIC_LIBRARY
}
)
if
(
MSVC
)
# this dependency can go once MSVC supports std::experimental::is_detected
find_package
(
zeep 5.1.8 REQUIRED
)
list
(
APPEND CIFPP_REQUIRED_LIBRARIES zeep::zeep
)
endif
()
# 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
"LibCIFPP"
)
write_version_header
(
${
PROJECT_SOURCE_DIR
}
/src/ LIB_NAME
"LibCIFPP"
)
...
...
README.md
View file @
640552ab
...
@@ -87,9 +87,6 @@ Other requirements are:
...
@@ -87,9 +87,6 @@ Other requirements are:
is the package
`zlib1g-dev`
.
is the package
`zlib1g-dev`
.
-
[
boost
](
https://www.boost.org
)
.
-
[
boost
](
https://www.boost.org
)
.
When building using MS Visual Studio, you will also need
[
libzeep
](
https://github.com/mhekkel/libzeep
)
since MSVC does not yet provide a C++ template required by libcifpp.
The Boost libraries are only needed in case you want to build the test
The Boost libraries are only needed in case you want to build the test
code or if you are using GCC. That last condition is due to a long
code or if you are using GCC. That last condition is due to a long
standing bug in the implementation of std::regex. It simply crashes
standing bug in the implementation of std::regex. It simply crashes
...
...
cmake/cifppConfig.cmake.in
View file @
640552ab
...
@@ -2,18 +2,11 @@
...
@@ -2,18 +2,11 @@
include("${CMAKE_CURRENT_LIST_DIR}/cifppTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/cifppTargets.cmake")
# Note that this set_and_check needs te be executed before
# find_dependency of Eigen3, otherwise the path is
# not found....
set_and_check(CIFPP_SHARE_DIR "@PACKAGE_CIFPP_DATA_DIR@")
set_and_check(CIFPP_SHARE_DIR "@PACKAGE_CIFPP_DATA_DIR@")
include(CMakeFindDependencyMacro)
include(CMakeFindDependencyMacro)
find_dependency(Threads)
find_dependency(Threads)
find_dependency(ZLIB REQUIRED)
find_dependency(ZLIB REQUIRED)
if(MSVC)
find_dependency(zeep REQUIRED)
endif()
check_required_components(cifpp)
check_required_components(cifpp)
include/cif++/text.hpp
View file @
640552ab
...
@@ -38,10 +38,39 @@
...
@@ -38,10 +38,39 @@
#include <vector>
#include <vector>
#if __has_include(<experimental/type_traits>)
#if __has_include(<experimental/type_traits>)
#include <experimental/type_traits>
#include <experimental/type_traits>
namespace
std_experimental
=
std
::
experimental
;
#else
#else
// sub optimal, but replicating the same code is worse
#include <zeep/type-traits.hpp>
// A quick hack to work around the missing is_detected in MSVC
namespace
std_experimental
{
namespace
detail
{
template
<
class
AlwaysVoid
,
template
<
class
...
>
class
Op
,
class
...
Args
>
struct
detector
{
using
value_t
=
std
::
false_type
;
};
template
<
template
<
class
...
>
class
Op
,
class
...
Args
>
struct
detector
<
std
::
void_t
<
Op
<
Args
...
>>
,
Op
,
Args
...
>
{
using
value_t
=
std
::
true_type
;
};
}
// namespace detail
template
<
template
<
class
...
>
class
Op
,
class
...
Args
>
using
is_detected
=
typename
detail
::
detector
<
void
,
Op
,
Args
...
>::
value_t
;
template
<
template
<
class
...
>
class
Op
,
class
...
Args
>
const
auto
is_detected_v
=
is_detected
<
Op
,
Args
...
>::
value
;
}
// namespace std_experimental
#endif
#endif
/**
/**
...
@@ -270,7 +299,6 @@ struct iless
...
@@ -270,7 +299,6 @@ struct iless
}
}
};
};
/// iset is a std::set of std::string but with a comparator that
/// iset is a std::set of std::string but with a comparator that
/// ignores character case.
/// ignores character case.
using
iset
=
std
::
set
<
std
::
string
,
iless
>
;
using
iset
=
std
::
set
<
std
::
string
,
iless
>
;
...
@@ -295,7 +323,7 @@ inline char tolower(int ch)
...
@@ -295,7 +323,7 @@ inline char tolower(int ch)
*
*
* If no dot character was found, the category name is empty. That's for
* If no dot character was found, the category name is empty. That's for
* cif 1.0 formatted data.
* cif 1.0 formatted data.
*/
*/
std
::
tuple
<
std
::
string
,
std
::
string
>
split_tag_name
(
std
::
string_view
tag
);
std
::
tuple
<
std
::
string
,
std
::
string
>
split_tag_name
(
std
::
string_view
tag
);
...
@@ -578,6 +606,6 @@ using from_chars_function = decltype(std::from_chars(std::declval<const char *>(
...
@@ -578,6 +606,6 @@ using from_chars_function = decltype(std::from_chars(std::declval<const char *>(
* @tparam T The type for which we want to find a from_chars/to_chars function
* @tparam T The type for which we want to find a from_chars/to_chars function
*/
*/
template
<
typename
T
>
template
<
typename
T
>
using
selected_charconv
=
typename
std
::
conditional_t
<
std
::
experimental
::
is_detected_v
<
from_chars_function
,
T
>
,
std_charconv
<
T
>
,
my_charconv
<
T
>>
;
using
selected_charconv
=
typename
std
::
conditional_t
<
std
_
experimental
::
is_detected_v
<
from_chars_function
,
T
>
,
std_charconv
<
T
>
,
my_charconv
<
T
>>
;
}
//
namespace
cif
}
//
namespace
cif
\ No newline at end of file
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