From 52ed397506fac405e18be6d35598e3b277125f1d Mon Sep 17 00:00:00 2001 From: Eric Eide Date: Sun, 15 Sep 2019 13:54:43 -0600 Subject: [PATCH] Specify that `csmith` is a C++14 program. This commit updates the CMake-based build path only. This commit leaves CXX_STANDARD_REQUIRED unset, which allows the C++ language standard requirement to "decay" as described in the CMake documentation: https://cmake.org/cmake/help/latest/prop_tgt/CXX_STANDARD.html Allowing for "decay" is maybe a bad idea, but I'm not sure, so let it decay for now. --- src/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b410994df..01745380a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,6 @@ ## -*- mode: CMake -*- ## -## Copyright (c) 2017 The University of Utah +## Copyright (c) 2017, 2019 The University of Utah ## All rights reserved. ## ## This file is part of `csmith', a random generator of C programs. @@ -208,6 +208,13 @@ add_executable(csmith ${csmith_SOURCES} ) +# Use C++14. +set_target_properties(csmith PROPERTIES + CXX_STANDARD 14 + CXX_EXTENSIONS NO + ) +# CXX_STANDARD_REQUIRED YES + if(BSD_LIBRARY) target_link_libraries(csmith "${BSD_LIBRARY}") endif()