-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgcc.sh
41 lines (36 loc) · 1.06 KB
/
gcc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
TOOLSDIR=`dirname $0`
source ${TOOLSDIR}/common.sh
echo Using GCC flags: ${GCC_FLAGS}
BUILDDIR=${BUILDROOT}/${PROJECT}-cmake-gcc
GCC_FLAGS=" -O1 \
-Wall \
-Wextra \
-Wshadow \
-Wnon-virtual-dtor \
-pedantic \
-Werror \
-Wold-style-cast \
-Wcast-align \
-Wunused \
-Woverloaded-virtual \
-Wpedantic \
-Wconversion \
-Wsign-conversion \
-Wmisleading-indentation \
-Wduplicated-cond \
-Wduplicated-branches \
-Wlogical-op \
-Wnull-dereference \
-Wuseless-cast \
-Wdouble-promotion \
-Wformat=2 \
-Wno-unknown-pragmas"
export CC=gcc
export CXX=g++
export CCC_CC=${CC}
export CCC_CXX=${CXX}
export CMAKE_CONFIG_ARGS="-DCMAKE_CXX_FLAGS=\"${GCC_FLAGS}\" ${CMAKE_CONFIG_ARGS}"
export CMAKE_CONFIG_ARGS="-DCMAKE_THREAD_LIBS_INIT=\"-lpthread\" ${CMAKE_CONFIG_ARGS}"
run_cmake ${BUILDDIR} \
&& run_ctest ${BUILDDIR}