Commit 910e0a5d authored by rmrf's avatar rmrf
Browse files

How about c++17?

parent 58b80089
cmake_minimum_required(VERSION 2.6)
project(systemc-clang)
# Use C++ standard version to c++14
set(CMAKE_CXX_STANDARD 14)
# Use C++ standard version to c++17
set(CMAKE_CXX_STANDARD 17)
# Always keep it on
set(CMAKE_CXX_STANDARD_REQUIRED ON)
......
......@@ -25,11 +25,11 @@ LLVMCONFIG=$LLVM_BUILD_DIR/bin/llvm-config
# Alternatively, you can use gcc and g++, but some flags don't work.
export CC=clang
export CXX=clang++
export LLVM_CXX_FLAGS=`$LLVMCONFIG --cxxflags`
export LLVM_CXX_FLAGS="`$LLVMCONFIG --cxxflags` -fno-aligned-allocation"
# Generate all the flags.
export LLVM_CXX_FLAGS="$LLVM_CXX_FLAGS -fvisibility-inlines-hidden"
export LLVM_LIBS=`$LLVMCONFIG --libs`
export LLVM_LIBS=`$LLVMCONFIG --libs`
export LLVM_LD_FLAGS=`$LLVMCONFIG --ldflags`
export LLVM_LD_FLAGS=`echo $LLVM_LD_FLAGS | sed 's/ *$//g'`
......@@ -28,7 +28,8 @@ set -x CXX clang++
set -x LLVM_CXX_FLAGS (eval $LLVMCONFIG --cxxflags)
# Generate all the flags.
set -x LLVM_CXX_FLAGS "$LLVM_CXX_FLAGS -fvisibility-inlines-hidden -faligned-allocation"
# -fno-aligned-allocation needed for c++17
set -x LLVM_CXX_FLAGS "$LLVM_CXX_FLAGS -fvisibility-inlines-hidden -fno-aligned-allocation"
set -x LLVM_LIBS (eval $LLVMCONFIG --libs)
set -x LLVM_LD_FLAGS (eval $LLVMCONFIG --ldflags)
set -x LLVM_LD_FLAGS (echo $LLVM_LD_FLAGS | sed 's/ *$//g')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment