summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2025-12-05 18:34:58 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2025-12-25 18:03:19 +0100
commit3091c5b12717a44a67962b9e245b2de8069a7cf5 (patch)
tree7ef57db830377e14b7ed0bf0312949aab921e381
parente4ad914a3da769188c46e19e648ae9a66d76f3a7 (diff)
Don't treat warnings as errors when building normally. But force warnings as errors on the build server.
-rw-r--r--Jenkinsfile12
-rw-r--r--ctor.cc1
-rw-r--r--test/ctor.cc22
3 files changed, 17 insertions, 18 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index a558359..e518b6c 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -11,11 +11,11 @@ pipeline {
echo 'Cleaning workspace ...'
sh 'git clean -d -x -f'
echo 'Building (clang) ...'
- sh 'CXX=/usr/local/opt/llvm/bin/clang++ LDFLAGS="-L/usr/local/opt/llvm/lib/c++ -L/usr/local/opt/llvm/lib/unwind -lunwind" ./bootstrap.sh'
+ sh 'CXXFLAGS=-Werror CXX=/usr/local/opt/llvm/bin/clang++ LDFLAGS="-L/usr/local/opt/llvm/lib/c++ -L/usr/local/opt/llvm/lib/unwind -lunwind" ./bootstrap.sh'
echo 'Testing (clang) ...'
sh './ctor check'
echo 'Testing suite (clang) ...'
- sh '(cd test/suite; CTORDIR=../../build CXX=/usr/local/opt/llvm/bin/clang++ LDFLAGS="-L/usr/local/opt/llvm/lib/c++ -L/usr/local/opt/llvm/lib/unwind -lunwind" ./test.sh)'
+ sh '(cd test/suite; CTORDIR=../../build CXXFLAGS=-Werror CXX=/usr/local/opt/llvm/bin/clang++ LDFLAGS="-L/usr/local/opt/llvm/lib/c++ -L/usr/local/opt/llvm/lib/unwind -lunwind" ./test.sh)'
}
post {
always {
@@ -32,11 +32,11 @@ pipeline {
echo 'Cleaning workspace ...'
sh 'git clean -d -x -f'
echo 'Building (gcc) ...'
- sh 'CXX=g++ ./bootstrap.sh'
+ sh 'CXXFLAGS=-Werror CXX=g++ ./bootstrap.sh'
echo 'Testing (gcc) ...'
sh './ctor check'
echo 'Testing suite (gcc) ...'
- sh '(cd test/suite; CTORDIR=../../build CXX=g++ ./test.sh)'
+ sh '(cd test/suite; CTORDIR=../../build CXXFLAGS=-Werror CXX=g++ ./test.sh)'
}
post {
always {
@@ -53,11 +53,11 @@ pipeline {
echo 'Cleaning workspace ...'
sh 'git clean -d -x -f'
echo 'Building (clang) ...'
- sh 'CXX=clang++ ./bootstrap.sh'
+ sh 'CXXFLAGS=-Werror CXX=clang++ ./bootstrap.sh'
echo 'Testing (clang) ...'
sh './ctor check'
echo 'Testing suite (clang) ...'
- sh '(cd test/suite; CTORDIR=../../build CXX=clang++ ./test.sh)'
+ sh '(cd test/suite; CTORDIR=../../build CXXFLAGS=-Werror CXX=clang++ ./test.sh)'
}
post {
always {
diff --git a/ctor.cc b/ctor.cc
index 67b1465..f3b8588 100644
--- a/ctor.cc
+++ b/ctor.cc
@@ -38,7 +38,6 @@ ctor::build_configurations ctorConfigs(const ctor::settings& settings)
"-O3",
"-g",
"-Wall",
- "-Werror",
"-Wextra",
"-Wshadow",
"-Wconversion",
diff --git a/test/ctor.cc b/test/ctor.cc
index 0d77a3e..e33dc77 100644
--- a/test/ctor.cc
+++ b/test/ctor.cc
@@ -19,7 +19,7 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings)
},
.flags = {
.cxxflags = {
- "-std=c++20", "-O3", "-Wall", "-Werror",
+ "-std=c++20", "-O3", "-Wall",
"-I../src", "-Iuunit",
"-DOUTPUT=\"argparser\"",
},
@@ -36,7 +36,7 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings)
},
.flags = {
.cxxflags = {
- "-std=c++20", "-O3", "-Wall", "-Werror",
+ "-std=c++20", "-O3", "-Wall",
"-I../src", "-Iuunit",
"-DOUTPUT=\"argsplit\"",
},
@@ -53,7 +53,7 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings)
},
.flags = {
.cxxflags = {
- "-std=c++20", "-O3", "-Wall", "-Werror",
+ "-std=c++20", "-O3", "-Wall",
"-I../src", "-Iuunit",
"-DOUTPUT=\"pointerlist\"",
},
@@ -72,7 +72,7 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings)
.depends = { "testprog", },
.flags = {
.cxxflags = {
- "-std=c++20", "-O3", "-Wall", "-Werror",
+ "-std=c++20", "-O3", "-Wall",
"-I../src", "-Iuunit",
"-DOUTPUT=\"deps\"",
},
@@ -87,7 +87,7 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings)
},
.flags = {
.cxxflags = {
- "-std=c++20", "-O3", "-Wall", "-Werror",
+ "-std=c++20", "-O3", "-Wall",
},
},
},
@@ -105,7 +105,7 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings)
.depends = { "testprog", },
.flags = {
.cxxflags = {
- "-std=c++20", "-O3", "-Wall", "-Werror",
+ "-std=c++20", "-O3", "-Wall",
"-I../src", "-Iuunit",
"-DOUTPUT=\"execute\"",
},
@@ -123,7 +123,7 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings)
.depends = { "libctor_nomain.a" },
.flags = {
.cxxflags = {
- "-std=c++20", "-O3", "-Wall", "-Werror",
+ "-std=c++20", "-O3", "-Wall",
"-I../src", "-Iuunit",
"-DOUTPUT=\"tasks\"",
},
@@ -141,7 +141,7 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings)
.depends = { "libctor_nomain.a" },
.flags = {
.cxxflags = {
- "-std=c++20", "-O3", "-Wall", "-Werror",
+ "-std=c++20", "-O3", "-Wall",
"-I../src", "-Iuunit",
"-DOUTPUT=\"cycle\"",
},
@@ -159,7 +159,7 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings)
.depends = { "libctor_nomain.a" },
.flags = {
.cxxflags = {
- "-std=c++20", "-O3", "-Wall", "-Werror",
+ "-std=c++20", "-O3", "-Wall",
"-I../src", "-Iuunit",
"-DOUTPUT=\"source_type\"",
},
@@ -179,7 +179,7 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings)
//.depends = { "libctor_nomain.a" },
.flags = {
.cxxflags = {
- "-std=c++20", "-O3", "-Wall", "-Werror",
+ "-std=c++20", "-O3", "-Wall",
"-I../src", "-Iuunit",
"-DOUTPUT=\"tools\"",
},
@@ -209,7 +209,7 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings)
},
.flags = {
.cxxflags = {
- "-std=c++20", "-O3", "-Wall", "-Werror",
+ "-std=c++20", "-O3", "-Wall",
"-I../src",
},
.ldflags = { "-pthread" },