fix(makefile): properly use -DCMAKE_CXX_FLAGS
All checks were successful
continuous-integration/drone/push Build is passing

..even if momentarily empty (no additional flags are being set from the
makefile directly, everything is set in CMakeLists.txt.
This commit is contained in:
surtur 2021-11-11 02:18:01 +01:00
parent ea11801789
commit b1fcc5d055
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -1,6 +1,6 @@
cppch = cppcheck
cppch_args = --language=c++ --std=c++20 --enable=all --verbose ./*.{cpp,h}
cpp_flags =
cpp_flags = CMAKE_CXX_FLAGS=
c = cmake
c_args = -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=
n = ninja
@ -18,13 +18,13 @@ v_rl = $(r_folder)_valgr
debug:
if [ ! -d "$(d_folder)" ]; then mkdir -pv $(d_folder); fi
$(v_env)false $(c) $(c_args)Debug -B $(d_folder) $(cpp_flags) && \
$(v_env)false $(c) $(c_args)Debug -B $(d_folder) -D$(cpp_flags) && \
$(n) $(n_args) $(d_folder)
@echo fortuna \(debug\) has been built inside $(d_folder)
release:
if [ ! -d "$(r_folder)" ]; then mkdir -pv $(r_folder); fi
$(v_env)false $(c) $(c_args)Release -B $(r_folder) $(cpp_flags) && \
$(v_env)false $(c) $(c_args)Release -B $(r_folder) -D$(cpp_flags) && \
$(n) $(n_args) $(r_folder)
@echo fortuna \(release\) has been built inside $(r_folder)
@ -39,14 +39,14 @@ valgrind: valgrind-debug
valgrind-debug:
if [ ! -d "$(v_db)" ]; then mkdir -pv "$(v_db)"; fi
$(v_env)true $(c) $(c_args)Debug -B "$(v_db)" $(cpp_flags) && \
$(v_env)true $(c) $(c_args)Debug -B "$(v_db)" -D$(cpp_flags) && \
$(n) $(n_args) "$(v_db)"
$(v) ./$(v_db)/fortuna
@echo fortuna \(debug\) has been built and checked using valgrind
valgrind-release:
if [ ! -d "$(v_rl)" ]; then mkdir -pv "$(v_rl)"; fi
$(v_env)true $(c) $(c_args)Release -B "$(v_rl)" $(cpp_flags) && \
$(v_env)true $(c) $(c_args)Release -B "$(v_rl)" -D$(cpp_flags) && \
$(n) $(n_args) "$(v_rl)"
$(v) ./$(v_rl)/fortuna
@echo fortuna \(release\) has been built and checked using valgrind