mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +00:00
Update latest C++ Standard Compilation flag (#2951)
For SystemC Project sets the CXX_STANDARD flag from SystemC CMake build config.
This commit is contained in:
parent
9c85426e77
commit
a4ab3e12f6
10
configure.ac
10
configure.ac
@ -272,13 +272,15 @@ AC_DEFUN([_MY_LDLIBS_CHECK_OPT],
|
|||||||
|
|
||||||
# Flag to select newest language standard supported
|
# Flag to select newest language standard supported
|
||||||
# Macros work such that first option that passes is the one we take
|
# 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)
|
# Currently enabled gnu++14/c++14 due to packaged SystemC dependency
|
||||||
# gnu++14 is the newest that Verilator supports
|
# gnu++17 is the newest that Verilator supports enable flags according to one's environment.
|
||||||
# std++03 is the oldest that Verilator supports
|
# 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++17)
|
||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++14)
|
_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++11)
|
||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++03)
|
_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++17)
|
||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++14)
|
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++14)
|
||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++11)
|
_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++03)
|
||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=c++11)
|
_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=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++03)
|
||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++11)
|
_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++14)
|
||||||
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++17)
|
#_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)
|
AC_SUBST(CFG_CXXFLAGS_STD_OLDEST)
|
||||||
|
|
||||||
# Flags for compiling Verilator internals including parser, and Verilated files
|
# Flags for compiling Verilator internals including parser, and Verilated files
|
||||||
|
@ -6,6 +6,7 @@ Please see the Verilator manual for 200+ additional contributors. Thanks to all.
|
|||||||
Ahmed El-Mahmoudy
|
Ahmed El-Mahmoudy
|
||||||
Alex Chadwick
|
Alex Chadwick
|
||||||
Àlex Torregrosa
|
Àlex Torregrosa
|
||||||
|
Ameya Vikram Singh
|
||||||
Andreas Kuster
|
Andreas Kuster
|
||||||
Chris Randall
|
Chris Randall
|
||||||
Conor McCullough
|
Conor McCullough
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
# cmake --build .
|
# cmake --build .
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.8)
|
cmake_minimum_required(VERSION 3.8)
|
||||||
project(cmake_hello_sc)
|
project(cmake_hello_sc CXX)
|
||||||
|
|
||||||
find_package(verilator HINTS $ENV{VERILATOR_ROOT} ${VERILATOR_ROOT})
|
find_package(verilator HINTS $ENV{VERILATOR_ROOT} ${VERILATOR_ROOT})
|
||||||
if (NOT verilator_FOUND)
|
if (NOT verilator_FOUND)
|
||||||
@ -37,6 +37,11 @@ find_package(SystemCLanguage QUIET)
|
|||||||
# Create a new executable target that will contain all your sources
|
# Create a new executable target that will contain all your sources
|
||||||
add_executable(example ../make_hello_sc/sc_main.cpp)
|
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
|
# Add the Verilated circuit to the target
|
||||||
verilate(example SYSTEMC
|
verilate(example SYSTEMC
|
||||||
INCLUDE_DIRS "../make_hello_sc"
|
INCLUDE_DIRS "../make_hello_sc"
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
# cmake --build .
|
# cmake --build .
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.8)
|
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})
|
find_package(verilator HINTS $ENV{VERILATOR_ROOT} ${VERILATOR_ROOT})
|
||||||
if (NOT verilator_FOUND)
|
if (NOT verilator_FOUND)
|
||||||
@ -37,6 +37,11 @@ find_package(SystemCLanguage QUIET)
|
|||||||
# Create a new executable target that will contain all your sources
|
# Create a new executable target that will contain all your sources
|
||||||
add_executable(example ../make_tracing_sc/sc_main.cpp)
|
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
|
# Add the Verilated circuit to the target
|
||||||
verilate(example SYSTEMC COVERAGE TRACE
|
verilate(example SYSTEMC COVERAGE TRACE
|
||||||
INCLUDE_DIRS "../make_tracing_sc"
|
INCLUDE_DIRS "../make_tracing_sc"
|
||||||
|
Loading…
Reference in New Issue
Block a user