-
Notifications
You must be signed in to change notification settings - Fork 26
/
CMakeLists.txt
39 lines (29 loc) · 1.06 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# For integration in a ESP project
# See https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html#using-third-party-cmake-projects-with-components
if (ESP_PLATFORM)
# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(simpleson_esp32)
idf_build_set_property(COMPILE_OPTIONS "-Wimplicit-fallthrough=2" APPEND)
else()
cmake_minimum_required (VERSION 3.8)
project(simpleson VERSION 1.1.0)
add_library(${PROJECT_NAME}
json.cpp
)
target_include_directories(${PROJECT_NAME} PUBLIC .)
if(MSVC)
# ignore warnings about scanf
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_compile_options(/W4 /WX)
elseif(BORLAND)
else()
add_compile_options(-Wall -Wextra -Werror)
endif()
enable_testing()
add_subdirectory (test)
add_subdirectory (examples)
add_subdirectory (issues)
endif()