Skip to content

Commit f588810

Browse files
rwgkax3l
andauthored
Replacing ICC C++14 with C++17 (#3570)
* Replacing ICC C++14 with C++17 * ICPC: -diag-disable:conversion Try to suppress the `-Werror-all` promotion in `#include <variant>` * Trying `-DPYBIND11_WERROR=OFF` * Trying `-Wno-conversion` (todo: make specific to C++17 if it works) * Inserting -Wno-conversion only for C++17 Co-authored-by: Axel Huebl <[email protected]>
1 parent ef070f7 commit f588810

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -559,37 +559,37 @@ jobs:
559559
set +e; source /opt/intel/oneapi/setvars.sh; set -e
560560
cmake --build build-11 --target test_cmake_build
561561
562-
- name: Configure C++14
562+
- name: Configure C++17
563563
run: |
564564
set +e; source /opt/intel/oneapi/setvars.sh; set -e
565-
cmake -S . -B build-14 \
565+
cmake -S . -B build-17 \
566566
-DPYBIND11_WERROR=ON \
567567
-DDOWNLOAD_CATCH=ON \
568568
-DDOWNLOAD_EIGEN=OFF \
569-
-DCMAKE_CXX_STANDARD=14 \
569+
-DCMAKE_CXX_STANDARD=17 \
570570
-DCMAKE_CXX_COMPILER=$(which icpc) \
571571
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
572572
573-
- name: Build C++14
573+
- name: Build C++17
574574
run: |
575575
set +e; source /opt/intel/oneapi/setvars.sh; set -e
576-
cmake --build build-14 -j 2 -v
576+
cmake --build build-17 -j 2 -v
577577
578-
- name: Python tests C++14
578+
- name: Python tests C++17
579579
run: |
580580
set +e; source /opt/intel/oneapi/setvars.sh; set -e
581581
sudo service apport stop
582-
cmake --build build-14 --target check
582+
cmake --build build-17 --target check
583583
584-
- name: C++ tests C++14
584+
- name: C++ tests C++17
585585
run: |
586586
set +e; source /opt/intel/oneapi/setvars.sh; set -e
587-
cmake --build build-14 --target cpptest
587+
cmake --build build-17 --target cpptest
588588
589-
- name: Interface test C++14
589+
- name: Interface test C++17
590590
run: |
591591
set +e; source /opt/intel/oneapi/setvars.sh; set -e
592-
cmake --build build-14 --target test_cmake_build
592+
cmake --build build-17 --target test_cmake_build
593593
594594
595595
# Testing on CentOS (manylinux uses a centos base, and this is an easy way

tests/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,9 @@ function(pybind11_enable_warnings target_name)
327327
elseif(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang|IntelLLVM)")
328328
target_compile_options(${target_name} PRIVATE -Werror)
329329
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
330+
if(CMAKE_CXX_STANDARD EQUAL 17) # See PR #3570
331+
target_compile_options(${target_name} PRIVATE -Wno-conversion)
332+
endif()
330333
target_compile_options(
331334
${target_name}
332335
PRIVATE

0 commit comments

Comments
 (0)