Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
c40ef612
Commit
c40ef612
authored
Aug 25, 2017
by
Dean Moldovan
Browse files
Skip boost::variant tests on unsupported compilers and versions of Boost
parent
c14c2762
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
tests/CMakeLists.txt
tests/CMakeLists.txt
+2
-2
tests/test_stl.cpp
tests/test_stl.cpp
+1
-1
No files found.
tests/CMakeLists.txt
View file @
c40ef612
...
@@ -114,8 +114,8 @@ if(PYBIND11_TEST_FILES_EIGEN_I GREATER -1)
...
@@ -114,8 +114,8 @@ if(PYBIND11_TEST_FILES_EIGEN_I GREATER -1)
endif
()
endif
()
endif
()
endif
()
# Optional dependency for some tests
# Optional dependency for some tests
(boost::variant is only supported with version >= 1.56)
find_package
(
Boost
)
find_package
(
Boost
1.56
)
# Compile with compiler warnings turned on
# Compile with compiler warnings turned on
function
(
pybind11_enable_warnings target_name
)
function
(
pybind11_enable_warnings target_name
)
...
...
tests/test_stl.cpp
View file @
c40ef612
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
// Test with `std::variant` in C++17 mode, or with `boost::variant` in C++11/14
// Test with `std::variant` in C++17 mode, or with `boost::variant` in C++11/14
#if PYBIND11_HAS_VARIANT
#if PYBIND11_HAS_VARIANT
using
std
::
variant
;
using
std
::
variant
;
#elif PYBIND11_TEST_BOOST
#elif
defined(
PYBIND11_TEST_BOOST
) && (!defined(_MSC_VER) || _MSC_VER >= 1910)
# include <boost/variant.hpp>
# include <boost/variant.hpp>
# define PYBIND11_HAS_VARIANT 1
# define PYBIND11_HAS_VARIANT 1
using
boost
::
variant
;
using
boost
::
variant
;
...
...
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