diff options
author | Manuel Bentele | 2020-10-30 12:44:16 +0100 |
---|---|---|
committer | Manuel Bentele | 2020-10-30 12:44:16 +0100 |
commit | f7433e0366ab3ecaa989c2d3ac549449c13ec8cc (patch) | |
tree | 514290a6f67f277453f4c2c4c89c161dd2312e79 /CMakeLists.txt | |
parent | [FUSE] removed unnecessary cmdln argument check for sticky mode (diff) | |
download | dnbd3-f7433e0366ab3ecaa989c2d3ac549449c13ec8cc.tar.gz dnbd3-f7433e0366ab3ecaa989c2d3ac549449c13ec8cc.tar.xz dnbd3-f7433e0366ab3ecaa989c2d3ac549449c13ec8cc.zip |
[BUILD] do not ignore C flags that are passed to CMake
C flags which are set by the environment variable CFLAGS have been
ignored by CMake since the corresponding CMake variable CMAKE_C_FLAGS
was not extended with those passed flags, but have been overwritten by a
fixed set of flags. This patch fixes the overwrite of CMAKE_C_FLAGS and
extends its content with the C flags passed in the environment variable.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a9eda5..42f259c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,7 +77,7 @@ gen_build_type(${INCLUDE_BUILD_HEADER_TEMPLATE} ${INCLUDE_BUILD_HEADER_GENERATE} add_definitions(-D_FILE_OFFSET_BITS=64) # define global C flags for compilation -set(CMAKE_C_FLAGS "-std=c11") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11") # enable all error warnings in Debug build configuration set(CMAKE_C_FLAGS_DEBUG "-Wall -Wextra -Wpedantic -Wconversion -Wformat -Wformat-security -Werror=format-security") |