project(dnsstat)
cmake_minimum_required(VERSION 2.8)

if(NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE Release)
endif()

set(CMAKE_C_FLAGS_DEBUG "-O0 -g")
set(CMAKE_C_FLAGS_RELEASE "-O2 -Wall -pedantic")
set(CMAKE_EXE_LINKER_FLAGS "-s")

aux_source_directory(src SRC_LIST)

add_executable(${PROJECT_NAME} ${SRC_LIST})
target_link_libraries(${PROJECT_NAME} pcap m)

project(dnsstat)
cmake_minimum_required(VERSION 2.8)

if(NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE Release)
endif()

set(CMAKE_C_FLAGS_DEBUG "-O0 -Wall -pedantic -g")
set(CMAKE_C_FLAGS_RELEASE "-O2 -Wall -pedantic")
set(CMAKE_EXE_LINKER_FLAGS "-s")

aux_source_directory(src SRC_LIST)

add_executable(${PROJECT_NAME} ${SRC_LIST})
target_link_libraries(${PROJECT_NAME} pcap m)

Add warnings CFLAGS for debug build
CMake: Add warnings CFLAGS for debug build
