mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 06:35:12 +00:00
Avoid duplicate C++ standard flags if CMAKE_CXX_STANDARD is set
CMAKE_CXX_STANDARD is only available on CMake >= 3.1. If the flag is set, we avoid initializing PYBIND11_CPP_STANDARD.
This commit is contained in:
parent
97aa54fefa
commit
76e06c89e4
@ -18,7 +18,7 @@ find_package(PythonLibsNew ${PYBIND11_PYTHON_VERSION} REQUIRED)
|
||||
include(CheckCXXCompilerFlag)
|
||||
include(CMakeParseArguments)
|
||||
|
||||
if(NOT PYBIND11_CPP_STANDARD)
|
||||
if(NOT PYBIND11_CPP_STANDARD AND NOT CMAKE_CXX_STANDARD)
|
||||
if(NOT MSVC)
|
||||
check_cxx_compiler_flag("-std=c++14" HAS_CPP14_FLAG)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user