Skip to content

Commit

Permalink
CMakeLists.txt: correct compile options
Browse files Browse the repository at this point in the history
Signed-off-by: Junbo Zheng <[email protected]>
  • Loading branch information
Junbo-Zheng committed Mar 1, 2024
1 parent 3d4f825 commit 05eb7ba
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ option(NV_DEBUG_LOG "nv debug log" ON)
option(ENABLE_SANITIZER "Enables sanitizer" ON)
option(NV_DEBUG_MOCK_DATA "nv debug mock data" ON)

set(NV_DATA_BUFFER_SIZE "1024" CACHE STRING "")

set(SOURCE nv/nv.c cJSON/cJSON.c cJSON/cJSON_Utils.c test.c)
set(NV_DATA_BUFFER_SIZE
"1024"
CACHE STRING "")

add_compile_options(-Wall -Werror -Wno-format -g)

add_executable(${PROJECT_NAME} ${SOURCE})

Expand All @@ -30,8 +31,6 @@ endif()
target_compile_definitions(
${PROJECT_NAME} PUBLIC -DCONFIG_NV_DATA_BUFFER_SIZE=${NV_DATA_BUFFER_SIZE})

add_compile_options(-Wall -Wextra -Werror -Wno-format -g)

target_include_directories(${PROJECT_NAME} PRIVATE "${CMAKE_SOURCE_DIR}/nv/")
target_include_directories(${PROJECT_NAME} PRIVATE "${CMAKE_SOURCE_DIR}/cJSON/")

Expand Down

0 comments on commit 05eb7ba

Please sign in to comment.