diff options
author | Yordan Karadzhov (VMware) <y.karadz@gmail.com> | 2021-01-08 16:31:38 +0200 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-01-12 12:07:05 -0500 |
commit | d78cb1b6f330e310b6061f63b88ee1d24ae3c48b (patch) | |
tree | 7b54494fb88914b465d4fc089236c060c165a0f8 | |
parent | 15df0097f82074bbf1cb4c5e1ee9cf0791fdbd51 (diff) | |
download | kernel-shark-d78cb1b6f330e310b6061f63b88ee1d24ae3c48b.tar.gz |
kernel-shark: Start using C++17
Update to a more recent version of the C++ standard. The particular
motivation to do this change now is because, we would like to use
"auto" as a function parameter type for lambda functions.
Link: https://lore.kernel.org/linux-trace-devel/20210108143140.285037-5-y.karadz@gmail.com
Signen-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9abacd04..dd620915 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,8 +62,12 @@ find_package (Boost COMPONENTS unit_test_framework) set(LIBRARY_OUTPUT_PATH "${KS_DIR}/lib") set(EXECUTABLE_OUTPUT_PATH "${KS_DIR}/bin") -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pthread -fPIC") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 -pthread -fPIC") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pthread -fPIC -fno-common") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pthread -fPIC -fno-common") + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RelWithDebInfo) |