Commit 79b8f158 authored by Nikola Dinev's avatar Nikola Dinev
Browse files

Ensure c++17 is used to build the bindings generator

parent 09cb61ef
Pipeline #817473 passed with stages
in 19 minutes and 33 seconds
......@@ -8,6 +8,9 @@ if (NOT LLVM_FOUND)
set(ELSA_BUILD_PYTHON_BINDINGS OFF PARENT_SCOPE)
else()
add_executable(pybind11_generator Parser.cpp)
# target_compile_features() doesn't set the c++ standard when setting to the compiler default - e.g. -std=c++17 for gcc-11
# this leads to the standard specified by LLVM_CXXFLAGS being erroneously used instead
list(FILTER LLVM_CXXFLAGS EXCLUDE REGEX "-std=c\\+\\+[0-9][0-9]")
target_compile_options(pybind11_generator PUBLIC ${LLVM_CXXFLAGS})
target_compile_features(pybind11_generator PUBLIC cxx_std_17)
target_include_directories(pybind11_generator PUBLIC ${LLVM_INCLUDE_DIR})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment