Skip to content

Commit 91d1fe0

Browse files
committed
Apply the same C++ standard rule to the QNN examples project
examples/qualcomm is configured as its own cmake project, not as a subdirectory of the root, so guarding the assignment is not enough there -- there is nothing to inherit from. The arm64 Windows job runs that configure separately and its runners still compiled at 17: qaihub_stable_diffusion_runner.vcxproj, qaihub_llama2_7b_runner.vcxproj, qaihub_llama3_8b_runner.vcxproj safe_numerics.h(71): error C2039: 'countl_zero': is not a member of 'std' They include the installed c10 headers, so they need the same rule the root applies. The x64 job passed after the previous commit because it builds only the backend, which is a subdirectory of the root configure.
1 parent 0140f1a commit 91d1fe0

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎examples/qualcomm/CMakeLists.txt‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,17 @@
44
# This source code is licensed under the BSD-style license found in the
55
# LICENSE file in the root directory of this source tree.
66

7-
set(CMAKE_CXX_STANDARD 17)
7+
# This is configured as its own project rather than from the repository root,
8+
# so it cannot inherit the standard and has to repeat the rule: the vendored c10
9+
# headers these runners include need C++20 on Windows. See the note beside
10+
# CMAKE_CXX_STANDARD in the root CMakeLists.txt.
11+
if(NOT CMAKE_CXX_STANDARD)
12+
if(WIN32)
13+
set(CMAKE_CXX_STANDARD 20)
14+
else()
15+
set(CMAKE_CXX_STANDARD 17)
16+
endif()
17+
endif()
818
# qnn_executor_runner: Like executor_runner but with QNN
919

1020
cmake_minimum_required(VERSION 3.19)

0 commit comments

Comments
 (0)