Commit Graph

7 Commits

Author SHA1 Message Date
Axel Huebl
6ebfc4b2b0 Document CMAKE_CXX_STANDARD
This variable is a CMake community standard to set the C++
standard of a build. Document it in favor of the previous variable,
which stays as a legacy flag for existing projects.

https://cmake.org/cmake/help/v3.17/variable/CMAKE_CXX_STANDARD.html
2020-04-26 09:17:10 +02:00
Lori A. Burns
868d94fcb4 Apply c++ standard flag only to files of CXX language. (#1678) 2019-06-11 22:07:57 +02:00
Jason Rhinelander
fad5d3386c Detect c++ standard unconditionally
Currently select_cxx_standard(), which sets PYBIND11_CPP_STANDARD when
not externally set, is only called from pybind11_add_module(), but the
embed target setup (which runs unconditionally) makes use of
${PYBIND11_CPP_STANDARD}, which isn't set yet.  This commit removes the
`select_cxx_standard` function completely and just always runs the
standard detection code.

This also tweaks the detection code to not bothering checking for the
`-std=c++11` flag when the `-std=c++14` detection succeeded.
2017-07-16 11:01:00 -04:00
Dean Moldovan
7f5c85c861 Add CMake target for embedding the Python interpreter
All targets provided by pybind11:

* pybind11::module - the existing target for creating extension modules
* pybind11::embed - new target for embedding the interpreter
* pybind11::pybind11 - common "base" target (headers only)
2017-05-28 02:12:24 +02:00
Lori A. Burns
53a338c05a fix one lingering ::pybind11 --> ::module target name (#603) 2017-01-13 11:10:22 +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
Lori A. Burns
5cafc99884 add CMake exported interface library and Config detection file 2016-12-13 21:44:19 +01:00