Centralize C++ version in Makefiles (#2713)
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -143,7 +143,7 @@ jobs:
|
||||
- name: Build
|
||||
run: |
|
||||
./autogen.sh
|
||||
PKG_CONFIG_PATH=/usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig ./configure CXXFLAGS='-std=c++14'
|
||||
PKG_CONFIG_PATH=/usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig ./configure
|
||||
make --jobs=$(sysctl -n hw.ncpu)
|
||||
|
||||
- name: Cppcheck
|
||||
|
||||
@ -38,7 +38,7 @@ clang-tidy:
|
||||
cppcheck:
|
||||
cppcheck --quiet --error-exitcode=1 \
|
||||
--inline-suppr \
|
||||
--std=c++14 \
|
||||
--std=@CPP_VERSION@ \
|
||||
--xml \
|
||||
-D HAVE_ATTR_XATTR_H \
|
||||
-D HAVE_SYS_EXTATTR_H \
|
||||
|
||||
@ -34,7 +34,10 @@ AC_CHECK_HEADERS([attr/xattr.h])
|
||||
AC_CHECK_HEADERS([sys/extattr.h])
|
||||
AC_CHECK_FUNCS([fallocate])
|
||||
|
||||
CXXFLAGS="-Wall -fno-exceptions -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=3 -std=c++14 $CXXFLAGS"
|
||||
CPP_VERSION=c++14
|
||||
AC_SUBST([CPP_VERSION])
|
||||
|
||||
CXXFLAGS="-Wall -fno-exceptions -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=3 -std=$CPP_VERSION $CXXFLAGS"
|
||||
|
||||
dnl ----------------------------------------------
|
||||
dnl For macOS
|
||||
|
||||
@ -103,7 +103,7 @@ TESTS = \
|
||||
test_string_util
|
||||
|
||||
clang-tidy:
|
||||
clang-tidy -extra-arg-before=-xc++ -extra-arg=-std=c++14 \
|
||||
clang-tidy -extra-arg-before=-xc++ -extra-arg=-std=@CPP_VERSION@ \
|
||||
*.h $(s3fs_SOURCES) test_curl_util.cpp test_page_list.cpp test_string_util.cpp \
|
||||
-- $(DEPS_CFLAGS) $(CPPFLAGS)
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ truncate_read_file_SOURCES = truncate_read_file.cc
|
||||
cr_filename_SOURCES = cr_filename.cc
|
||||
|
||||
clang-tidy:
|
||||
clang-tidy -extra-arg=-std=c++14 \
|
||||
clang-tidy -extra-arg=-std=@CPP_VERSION@ \
|
||||
$(junk_data_SOURCES) \
|
||||
$(write_multiblock_SOURCES) \
|
||||
$(mknod_test_SOURCES) \
|
||||
|
||||
Reference in New Issue
Block a user