Skip to content

Commit

Permalink
Bump c++ standard support from c++11 to c++14
Browse files Browse the repository at this point in the history
git-svn-id: svn://ultimatepp.org/upp/trunk@10923 f0d560ea-af0d-0410-9eb7-867de7ffcac7
  • Loading branch information
amrein committed Mar 8, 2017
1 parent 4f2e826 commit e026b38
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion uppbox/Scripts/CLANGMK.bm
@@ -1,7 +1,7 @@
BUILDER = "CLANG";
COMPILER = "clang++";
COMMON_OPTIONS = "-Wno-logical-op-parentheses";
COMMON_CPP_OPTIONS = "-std=c++11";
COMMON_CPP_OPTIONS = "-std=c++14";
COMMON_C_OPTIONS = "";
COMMON_FLAGS = "";
DEBUG_INFO = "2";
Expand Down
2 changes: 1 addition & 1 deletion uppbox/Scripts/GCCMK.bm
@@ -1,5 +1,5 @@
BUILDER = "GCC";
COMMON_CPP_OPTIONS = "-std=c++11";
COMMON_CPP_OPTIONS = "-std=c++14";
DEBUG_INFO = "2";
DEBUG_BLITZ = "1";
DEBUG_LINKMODE = "1";
Expand Down
19 changes: 17 additions & 2 deletions uppbox/Scripts/domake
Expand Up @@ -11,6 +11,9 @@
minimum_gcc_dumpversion="4.9.0"
minimum_gcc_version=$(convert_version_to_number "$minimum_gcc_dumpversion")

minimum_clang_dumpversion="3.5.0"
minimum_clang_version=$(convert_version_to_number "$minimum_clang_dumpversion")

show_debug_info="true"
show_debug_warning="true"
show_debug_error="true"
Expand All @@ -28,7 +31,7 @@ unset make_parameter_array
### Constants

DEFAULT_GCC_CXXFLAGS=""
DEFAULT_CLANG_CXXFLAGS="-O3 -ffunction-sections -fdata-sections -Wno-logical-op-parentheses -std=c++11"
DEFAULT_CLANG_CXXFLAGS="-O3 -ffunction-sections -fdata-sections -Wno-logical-op-parentheses -std=c++14"
DEFAULT_CPP_CXXFLAGS=""
DEFAULT_OTHER_CPP_CXXFLAGS=""

Expand Down Expand Up @@ -215,8 +218,9 @@ else
gcc_dumpversion=$(gcc -dumpversion)
gcc_version=$(convert_version_to_number "$gcc_dumpversion")

if [ "$gcc_version" -gt "$minimum_gcc_version" ]
if [ "$gcc_version" -ge "$minimum_gcc_version" ]
then
log_debug_info "Will use g++ version: $gcc_dumpversion"
use_gcc="true"
CXX="g++"

Expand All @@ -232,9 +236,20 @@ else
if which clang++
then
log_debug_info "Found $(which clang++)"

clang_dumpversion=$(clang++ -dumpversion)
clang_version=$(convert_version_to_number "$clang_dumpversion")

log_debug_info "Will use clang++ version: $clang_dumpversion"
use_clang="true"
CXX="clang++"

if [ "$clang_version" -lt "$minimum_clang_version" ]
then
log_debug_warning "The clang++ compiler found (e.q $clang_dumpversion) has a lower version than the minimum required version (e.q $minimum_clang_dumpversion)"

fi

else
log_debug_info "Searching for a standard c++ compiler"

Expand Down
5 changes: 3 additions & 2 deletions uppbox/Scripts/upp-devel.spec
Expand Up @@ -128,7 +128,7 @@ LIBDIR=$( pkg-config --libs-only-L gtk+-2.0 libnotify x11 | awk ' { gsub ( / /,
cat > %{buildroot}/%{_datadir}/%{name}/GCC.bm << EOF
BUILDER = "GCC";
COMPILER = "g++";
COMMON_CPP_OPTIONS = "-std=c++11";
COMMON_CPP_OPTIONS = "-std=c++14";
DEBUG_INFO = "2";
DEBUG_BLITZ = "1";
DEBUG_LINKMODE = "1";
Expand Down Expand Up @@ -156,7 +156,7 @@ cat > %{buildroot}/%{_datadir}/%{name}/CLANG.bm << EOF
BUILDER = "CLANG";
COMPILER = "clang++";
COMMON_OPTIONS = "-Wno-logical-op-parentheses";
COMMON_CPP_OPTIONS = "-std=c++11";
COMMON_CPP_OPTIONS = "-std=c++14";
COMMON_C_OPTIONS = "";
COMMON_FLAGS = "";
DEBUG_INFO = "2";
Expand Down Expand Up @@ -206,6 +206,7 @@ rm -fr %{buildroot}
%changelog
* %date Amrein-Marie Christophe <camreinmarie@free.fr> %version-1
- New snapshot
- Used stdc++14 instead of stdc++11 in build method files (.bm)

* Tue Jan 31 2017 Amrein-Marie Christophe <camreinmarie@free.fr> 2017.1-1
- New release
Expand Down

0 comments on commit e026b38

Please sign in to comment.