Skip to content

Commit 380e97c

Browse files
Makefile.am and configure.ac: setting default CXXFLAGS in the right place
1 parent f4f0e6c commit 380e97c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ EXTRA_DIST = README.md LICENSE Configuration example.fq test
1919
ACLOCAL_AMFLAGS = -I m4
2020
AM_CPPFLAGS = -I $(top_srcdir)/src
2121

22-
CXXFLAGS = -O3 -DNDEBUG # default optimization on; override on cli
22+
### ADS: use AM_CXXFLAGS if these are needed
23+
## AM_CXXFLAGS = -Wall -Wextra -Wpedantic -Wno-unknown-attributes
2324

2425
TESTS = test/falco.test
2526
TEST_EXTENSIONS = .test

configure.ac

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ AM_INIT_AUTOMAKE([subdir-objects foreign])
2424
AC_CONFIG_MACRO_DIR([m4])
2525
AC_LANG(C++)
2626
AC_PROG_CXX
27+
28+
# Set CXXFLAGS only if the user hasn't set them
29+
AS_IF([test "x$CXXFLAGS_set" != "xset"], [
30+
CXXFLAGS="-O3 -DNDEBUG"
31+
])
32+
AC_MSG_NOTICE([CXXFLAGS is $CXXFLAGS])
33+
2734
AX_CXX_COMPILE_STDCXX_17([noext], [mandatory])
2835
AC_OPENMP([C++]) dnl make sure we have openmp for multi-core in falco
2936

0 commit comments

Comments
 (0)