26 lines
605 B
CMake
26 lines
605 B
CMake
cmake_minimum_required (VERSION 3.6)
|
|
project(speedtest LANGUAGES C)
|
|
|
|
set(CMAKE_C_STANDARD 23)
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
set(CMAKE_C_FLAGS "-ffunction-sections -fdata-sections")
|
|
if (APPLE)
|
|
elseif (UNIX)
|
|
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--gc-sections")
|
|
endif()
|
|
|
|
include_directories(./src/lib/ ./src)
|
|
|
|
FILE(GLOB SOURCES src/*.c src/lib/*.c src/file_db/*.c src/config/*.c src/api/*.c src/database/*.c src/security/*.c src/utils/*.c)
|
|
|
|
option(USE_WERROR "Enable warnings as errors support" OFF)
|
|
|
|
if(USE_WERROR)
|
|
add_definitions(-Werror)
|
|
endif()
|
|
|
|
add_executable(
|
|
speedtest
|
|
${SOURCES}
|
|
)
|