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!
|
|
|
|
|
2014-10-16 16:23:24 +02:00
|
|
|
set(GTEST_DIR ../third-party/gtest-1.7.0)
|
|
|
|
|
2014-10-24 18:31:50 +02:00
|
|
|
file(GLOB TESTS_FILES *.hpp *.cpp)
|
2014-10-16 16:23:24 +02:00
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${GTEST_DIR}
|
|
|
|
${GTEST_DIR}/include)
|
|
|
|
|
2014-11-15 15:09:48 +01:00
|
|
|
add_definitions(-DGTEST_HAS_PTHREAD=0)
|
|
|
|
|
2015-08-27 21:47:49 +02:00
|
|
|
# Workaround for Visual Studio 2012
|
|
|
|
if (MSVC AND MSVC_VERSION EQUAL 1700)
|
|
|
|
add_definitions(-D_VARIADIC_MAX=10)
|
|
|
|
endif()
|
|
|
|
|
2014-10-16 16:23:24 +02:00
|
|
|
add_executable(ArduinoJsonTests
|
|
|
|
${TESTS_FILES}
|
|
|
|
${GTEST_DIR}/src/gtest-all.cc
|
|
|
|
${GTEST_DIR}/src/gtest_main.cc)
|
|
|
|
|
|
|
|
target_link_libraries(ArduinoJsonTests ArduinoJson)
|
|
|
|
|
2015-07-10 22:11:26 +02:00
|
|
|
add_test(ArduinoJsonTests ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ArduinoJsonTests)
|