Skip to content

Commit

Permalink
tests/cc: Use c++14 standard
Browse files Browse the repository at this point in the history
default c++ standard was bumped to c++17 when using clang16+ compiler
via 907b89c, however, tests which use check tool is not yet ported
to work with c++17 standard, therefore use c++14 on tests

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Hengqi Chen <chenhengqi@outlook.com>
  • Loading branch information
kraj authored and chenhengqi committed Mar 7, 2023
1 parent a894979 commit 1ea0390
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/cc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ add_compile_options(-DCMAKE_CURRENT_BINARY_DIR="${CMAKE_CURRENT_BINARY_DIR}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-result -fPIC")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-result -fPIC")

if(${LLVM_PACKAGE_VERSION} VERSION_EQUAL 16 OR ${LLVM_PACKAGE_VERSION} VERSION_GREATER 16)
set(CMAKE_CXX_STANDARD 14)
endif()

if(ENABLE_USDT)
set(TEST_LIBBCC_SOURCES
test_libbcc.cc
Expand Down

0 comments on commit 1ea0390

Please sign in to comment.