diff --git a/configure.ac b/configure.ac index 6f82920b9..5dd1ed07c 100644 --- a/configure.ac +++ b/configure.ac @@ -272,13 +272,15 @@ AC_DEFUN([_MY_LDLIBS_CHECK_OPT], # Flag to select newest language standard supported # Macros work such that first option that passes is the one we take -# gnu++17 code is clean, but SystemC in 2018 doesn't link with it (bug1339) -# gnu++14 is the newest that Verilator supports +# Currently enabled gnu++14/c++14 due to packaged SystemC dependency +# gnu++17 is the newest that Verilator supports enable flags according to one's environment. # std++03 is the oldest that Verilator supports +#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++20) #_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++17) _MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++14) _MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++11) _MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++03) +#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++20) #_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++17) _MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++14) _MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++11) @@ -289,11 +291,13 @@ AC_SUBST(CFG_CXXFLAGS_STD_NEWEST) _MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=c++03) _MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=c++11) _MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=c++14) -#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=std++17) +#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=c++17) +#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=c++20) _MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++03) _MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++11) _MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++14) #_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++17) +#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++20) AC_SUBST(CFG_CXXFLAGS_STD_OLDEST) # Flags for compiling Verilator internals including parser, and Verilated files diff --git a/docs/CONTRIBUTORS b/docs/CONTRIBUTORS index 2196c9c2e..3293cb65f 100644 --- a/docs/CONTRIBUTORS +++ b/docs/CONTRIBUTORS @@ -6,6 +6,7 @@ Please see the Verilator manual for 200+ additional contributors. Thanks to all. Ahmed El-Mahmoudy Alex Chadwick Àlex Torregrosa +Ameya Vikram Singh Andreas Kuster Chris Randall Conor McCullough diff --git a/examples/cmake_hello_sc/CMakeLists.txt b/examples/cmake_hello_sc/CMakeLists.txt index 211b73170..490391c12 100644 --- a/examples/cmake_hello_sc/CMakeLists.txt +++ b/examples/cmake_hello_sc/CMakeLists.txt @@ -20,7 +20,7 @@ # cmake --build . cmake_minimum_required(VERSION 3.8) -project(cmake_hello_sc) +project(cmake_hello_sc CXX) find_package(verilator HINTS $ENV{VERILATOR_ROOT} ${VERILATOR_ROOT}) if (NOT verilator_FOUND) @@ -37,6 +37,11 @@ find_package(SystemCLanguage QUIET) # Create a new executable target that will contain all your sources add_executable(example ../make_hello_sc/sc_main.cpp) +set_property( + TARGET example + PROPERTY CXX_STANDARD ${SystemC_CXX_STANDARD} + ) + # Add the Verilated circuit to the target verilate(example SYSTEMC INCLUDE_DIRS "../make_hello_sc" diff --git a/examples/cmake_tracing_sc/CMakeLists.txt b/examples/cmake_tracing_sc/CMakeLists.txt index eb785d76a..a06af17f8 100644 --- a/examples/cmake_tracing_sc/CMakeLists.txt +++ b/examples/cmake_tracing_sc/CMakeLists.txt @@ -20,7 +20,7 @@ # cmake --build . cmake_minimum_required(VERSION 3.8) -project(cmake_tracing_sc_example) +project(cmake_tracing_sc_example CXX) find_package(verilator HINTS $ENV{VERILATOR_ROOT} ${VERILATOR_ROOT}) if (NOT verilator_FOUND) @@ -37,6 +37,11 @@ find_package(SystemCLanguage QUIET) # Create a new executable target that will contain all your sources add_executable(example ../make_tracing_sc/sc_main.cpp) +set_property( + TARGET example + PROPERTY CXX_STANDARD ${SystemC_CXX_STANDARD} + ) + # Add the Verilated circuit to the target verilate(example SYSTEMC COVERAGE TRACE INCLUDE_DIRS "../make_tracing_sc"