2016-01-07 22:35:12 +01:00
|
|
|
# Copyright Benoit Blanchon 2014-2016
|
|
|
|
# MIT License
|
|
|
|
#
|
|
|
|
# Arduino JSON library
|
|
|
|
# https://github.com/bblanchon/ArduinoJson
|
|
|
|
# If you like this project, please add a star!
|
|
|
|
|
2016-06-22 21:41:19 +02:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
2014-10-14 09:51:23 +02:00
|
|
|
project(ArduinoJson)
|
|
|
|
|
2014-10-14 10:01:46 +02:00
|
|
|
enable_testing()
|
2014-10-14 09:51:23 +02:00
|
|
|
|
2014-10-16 21:29:59 +02:00
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
|
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
|
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
|
|
|
|
|
2014-11-30 15:11:19 +01:00
|
|
|
if(${COVERAGE})
|
2015-07-10 22:11:26 +02:00
|
|
|
set(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
|
2014-11-30 15:11:19 +01:00
|
|
|
endif()
|
|
|
|
|
2017-01-01 21:29:38 +01:00
|
|
|
if(${SANITIZE})
|
|
|
|
set(CMAKE_CXX_FLAGS "-fsanitize=address,undefined")
|
|
|
|
endif()
|
|
|
|
|
2015-07-10 22:11:26 +02:00
|
|
|
add_subdirectory(test)
|