Commit Graph

11 Commits

Author SHA1 Message Date
Jason Rhinelander 77710ff01c Make PYBIND11_CPP_STANDARD work under MSVC
Under MSVC we were ignoring PYBIND11_CPP_STANDARD and simply not
passing any standard (which makes MSVC default to its C++14 mode).

MSVC 2015u3 added the `/std:c++14` and `/std:c++latest` flags; the
latter, under MSVC 2017, enables some C++17 features (such as
`std::optional` and `std::variant`), so it is something we need to
start supporting under MSVC.

This makes the PYBIND11_CPP_STANDARD cmake variable work under MSVC,
defaulting it to /std:c++14 (matching the default -std=c++14 for
non-MSVC).

It also adds a new appveyor test running under MSVC 2017 with
/std:c++latest, which runs (and passes) the
`std::optional`/`std::variant` tests.

Also updated the documentation to clarify the c++ flags and add show
MSVC flag examples.
2017-05-09 16:41:47 -04:00
Wenzel Jakob f3de2d5521 reference binder project from documentation 2016-12-26 13:54:50 +01:00
Dean Moldovan 71e8a7962c Rename target from pybind11::pybind11 to pybind11::module
Makes room for an eventual pybind11::embedded target.
2016-12-19 16:34:48 +01:00
Dean Moldovan 0cbec5c96e Add new options and docs for pybind11_add_module
See the documentation for a description of the options.
2016-12-19 16:34:48 +01:00
Lori A. Burns f4b81b36bf reflow some docs paragraphs 2016-12-13 21:44:19 +01:00
Lori A. Burns 5cafc99884 add CMake exported interface library and Config detection file 2016-12-13 21:44:19 +01:00
Wenzel Jakob fe34241e50 minor doc & style fixes 2016-09-06 13:02:29 +09:00
Wenzel Jakob ca8dc08a66 updated pbtest link 2016-06-03 14:24:17 +02:00
Wenzel Jakob aa79af09f6 updated cmake example link 2016-06-03 12:23:24 +02:00
Dean Moldovan 24ddf4b3f1 Update CMake build documentation 2016-05-27 00:11:52 +02:00
Wenzel Jakob a439ccaa0e minor FAQ edits, referenced cppimport project 2016-05-17 10:47:52 +02:00