hotfix: do not ignore CFLAGS env

This commit is contained in:
Tobias Reisinger 2020-07-17 23:33:35 +02:00
parent a8df1d0c70
commit 3e6d0333b7

View file

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.7) cmake_minimum_required (VERSION 3.7)
project(core project(core
VERSION 0.2.2 VERSION 0.2.3
LANGUAGES C) LANGUAGES C)
add_executable(core src/main.c) add_executable(core src/main.c)
@ -8,6 +8,7 @@ add_executable(core src/main.c)
target_link_libraries(core -lsqlite3) target_link_libraries(core -lsqlite3)
target_link_libraries(core -luuid) target_link_libraries(core -luuid)
set(CMAKE_C_FLAGS "$ENV{CFLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wpedantic -Werror -Wall -Wextra -ffile-prefix-map=${CMAKE_SOURCE_DIR}/src/=") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wpedantic -Werror -Wall -Wextra -ffile-prefix-map=${CMAKE_SOURCE_DIR}/src/=")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -fprofile-arcs -ftest-coverage") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -fprofile-arcs -ftest-coverage")