Skip to content

Commit 95aef37

Browse files
authored
Stop building with -Werror (#81)
* Stop building with `-Werror` `-Werror` should not be used in default build flags as it makes the compilation fail every time somebody tries to build with a new version of the compiler which triggers a new warning. It should only be set when running CI. * Use `-Werror` on CI * Update utils.jl * Revert previous change * Simplify logic * Add missing parentheses
1 parent 4a934fd commit 95aef37

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Make.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ else
5353
SONAME_FLAG := -Wl,-soname=$(LIB_MAJOR_VERSION)
5454
endif
5555

56-
LBT_CFLAGS := -g -O2 -Werror -std=c99 $(FPIC) -DLIBRARY_EXPORTS -D_GNU_SOURCE $(CFLAGS)
56+
LBT_CFLAGS := -g -O2 -std=c99 $(FPIC) -DLIBRARY_EXPORTS -D_GNU_SOURCE $(CFLAGS)
5757
LBT_LDFLAGS := $(LDFLAGS)
5858

5959
ifeq ($(OS),Linux)

test/utils.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ function build_libblastrampoline()
6161
return blastrampoline_build_dir
6262
end
6363

64-
cflags_add = needs_m32() ? "-m32" : ""
64+
cflags_add = "-Werror" * (needs_m32() ? " -m32" : "")
6565
dir = mktempdir()
6666
srcdir = joinpath(dirname(@__DIR__), "src")
67-
run(`$(make) -sC $(pathesc(srcdir)) CFLAGS=$(cflags_add) ARCH=$(Sys.ARCH) clean`)
68-
run(`$(make) -sC $(pathesc(srcdir)) CFLAGS=$(cflags_add) ARCH=$(Sys.ARCH) install builddir=$(pathesc(dir))/build prefix=$(pathesc(dir))/output`)
67+
run(`$(make) -sC $(pathesc(srcdir)) CFLAGS="$(cflags_add)" ARCH=$(Sys.ARCH) clean`)
68+
run(`$(make) -sC $(pathesc(srcdir)) CFLAGS="$(cflags_add)" ARCH=$(Sys.ARCH) install builddir=$(pathesc(dir))/build prefix=$(pathesc(dir))/output`)
6969

7070
global blastrampoline_build_dir = joinpath(dir, "output")
7171

0 commit comments

Comments
 (0)