Skip to content

Commit

Permalink
Specify that csmith is a C++14 program.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
eeide committed Sep 15, 2019
1 parent 98a7216 commit 52ed397
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion 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.
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 52ed397

Please sign in to comment.