-
Notifications
You must be signed in to change notification settings - Fork 309
Closed
Labels
Milestone
Description
Bug Report
Build Problem
The root CMakeLists.txt
tries to set C++11 as standard for pybind11:
if(MSVC)
set(PYBIND11_CPP_STANDARD /std:c++11)
However, MSVC does not support this argument:
cl : Command line warning D9002: ignoring unknown option "/std:c++11"
C++ 11 support in Visual Studio should be turned on by default. [source]
[...] msvc (and clang) [are] missing a dedicated c++11 std compiler switch (msvc automagically detects if code is using C++11 or C++03 etc.) [source]
Beware: /std:c11
sets C11 as standard, not C++11!
To Reproduce
- Operating System: Windows 10
- Python version: 2.7.18
- Example snippet that demonstrates the issue - if it's a build issue:
cmake .. -G "Visual Studio 16 2019" cmake --build . --config Release
- OpenTimelineIO release version or commit hash: 22945fd
- Compiler information:
Microsoft (R) C/C++-Optimierungscompiler Version 19.28.29333 für x64
Expected Behavior
There seem to be two options:
- Not set this option at all for MSVC
- Use
target_compile_features(pybind11 PRIVATE cxx_std_11)
(source) to let CMake handle it automatically
Logs
Microsoft (R)-Build-Engine, Version 16.8.1+bd2ea1e3c für .NET Framework
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
Checking Build System
Auto build dll exports
opentime.vcxproj -> C:\Daten\Olive\Deps\OpenTimelineIO\build6\src\opentime\Release\opentime.dll
Auto build dll exports
opentimelineio.vcxproj -> C:\Daten\Olive\Deps\OpenTimelineIO\build6\src\opentimelineio\Release\opentimelineio.dll
cl : befehlszeile warning D9002: Unbekannte Option "/std:c++11" wird ignoriert. [C:\Daten\Olive\Deps\OpenTimelineIO\bui
ld6\src\py-opentimelineio\opentime-bindings\_opentime.vcxproj]
cl : befehlszeile warning D9002: Unbekannte Option "/std:c++11" wird ignoriert. [C:\Daten\Olive\Deps\OpenTimelineIO\bui
ld6\src\py-opentimelineio\opentime-bindings\_opentime.vcxproj]
opentime_bindings.cpp
cl : befehlszeile warning D9002: Unbekannte Option "/std:c++11" wird ignoriert. [C:\Daten\Olive\Deps\OpenTimelineIO\bui
ld6\src\py-opentimelineio\opentime-bindings\_opentime.vcxproj]
opentime_rationalTime.cpp
cl : befehlszeile warning D9002: Unbekannte Option "/std:c++11" wird ignoriert. [C:\Daten\Olive\Deps\OpenTimelineIO\bui
ld6\src\py-opentimelineio\opentime-bindings\_opentime.vcxproj]
opentime_timeRange.cpp
cl : befehlszeile warning D9002: Unbekannte Option "/std:c++11" wird ignoriert. [C:\Daten\Olive\Deps\OpenTimelineIO\bui
ld6\src\py-opentimelineio\opentime-bindings\_opentime.vcxproj]
opentime_timeTransform.cpp