mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 13:15:12 +00:00
fix: typo for warning on C++17, support Win + 2.7
This commit is contained in:
parent
1b92cd1703
commit
f64d5aa6da
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -118,14 +118,14 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: >
|
run: >
|
||||||
cmake -S . -B build2
|
cmake -S . -B build2
|
||||||
-DPYBIND17_WERROR=ON
|
-DPYBIND11_WERROR=ON
|
||||||
-DDOWNLOAD_CATCH=ON
|
-DDOWNLOAD_CATCH=ON
|
||||||
-DDOWNLOAD_EIGEN=ON
|
-DDOWNLOAD_EIGEN=ON
|
||||||
-DCMAKE_CXX_STANDARD=${{ matrix.max-cxx-std }}
|
-DCMAKE_CXX_STANDARD=${{ matrix.max-cxx-std }}
|
||||||
-DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)")
|
-DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)")
|
||||||
|
|
||||||
- name: Build C++${{ matrix.max-cxx-std }}
|
- name: Build C++${{ matrix.max-cxx-std }}
|
||||||
run: cmake --build build2 -j 2
|
run: cmake --build build2 -j 2 -v
|
||||||
|
|
||||||
- name: Python tests C++${{ matrix.max-cxx-std }}
|
- name: Python tests C++${{ matrix.max-cxx-std }}
|
||||||
run: cmake --build build2 --target pytest
|
run: cmake --build build2 --target pytest
|
||||||
|
@ -176,9 +176,14 @@ endif()
|
|||||||
|
|
||||||
message(STATUS "CXX Compiler version: ${CMAKE_CXX_COMPILER_VERSION}")
|
message(STATUS "CXX Compiler version: ${CMAKE_CXX_COMPILER_VERSION}")
|
||||||
|
|
||||||
|
# Workaround for Python 2.7 and C++17 (C++14 as a warning) incompatibility
|
||||||
set(clang_4plus "$<AND:$<CXX_COMPILER_ID:Clang>,$<NOT:$<VERSION_LESS:$<CXX_COMPILER_VERSION>,3.9>>>")
|
set(clang_4plus "$<AND:$<CXX_COMPILER_ID:Clang>,$<NOT:$<VERSION_LESS:$<CXX_COMPILER_VERSION>,3.9>>>")
|
||||||
set(no_register "$<OR:${clang_4plus},$<CXX_COMPILER_ID:AppleClang>>")
|
set(no_register "$<OR:${clang_4plus},$<CXX_COMPILER_ID:AppleClang>>")
|
||||||
target_compile_options(pybind11 INTERFACE "$<${no_register}:-Wno-register;-Wno-deprecated-register>")
|
set(cxx_no_register "$<AND:$<COMPILE_LANGUAGE:CXX>,${no_register}>")
|
||||||
|
set(msvc "$<CXX_COMPILER_ID:MSVC>")
|
||||||
|
target_compile_options(
|
||||||
|
pybind11 INTERFACE "$<${cxx_no_register}:-Wno-register;-Wno-deprecated-register>"
|
||||||
|
"$<${msvc}:/wd5033>")
|
||||||
|
|
||||||
add_library(embed INTERFACE)
|
add_library(embed INTERFACE)
|
||||||
add_library(pybind11::embed ALIAS embed)
|
add_library(pybind11::embed ALIAS embed)
|
||||||
|
Loading…
Reference in New Issue
Block a user