Rev | Line | |
---|
[209] | 1 | # Copyright Benoit Blanchon 2014-2016
|
---|
| 2 | # MIT License
|
---|
| 3 | #
|
---|
| 4 | # Arduino JSON library
|
---|
| 5 | # https://github.com/bblanchon/ArduinoJson
|
---|
| 6 | # If you like this project, please add a star!
|
---|
| 7 |
|
---|
| 8 | set(GTEST_DIR ../third-party/gtest-1.7.0)
|
---|
| 9 |
|
---|
| 10 | file(GLOB TESTS_FILES *.hpp *.cpp)
|
---|
| 11 |
|
---|
| 12 | include_directories(
|
---|
| 13 | ${GTEST_DIR}
|
---|
| 14 | ${GTEST_DIR}/include)
|
---|
| 15 |
|
---|
| 16 | add_definitions(-DGTEST_HAS_PTHREAD=0)
|
---|
| 17 |
|
---|
| 18 | # Workaround for Visual Studio 2012
|
---|
| 19 | if (MSVC AND MSVC_VERSION EQUAL 1700)
|
---|
| 20 | add_definitions(-D_VARIADIC_MAX=10)
|
---|
| 21 | endif()
|
---|
| 22 |
|
---|
| 23 | if (MSVC)
|
---|
| 24 | add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
---|
| 25 | endif()
|
---|
| 26 |
|
---|
| 27 | add_executable(ArduinoJsonTests
|
---|
| 28 | ${TESTS_FILES}
|
---|
| 29 | ${GTEST_DIR}/src/gtest-all.cc
|
---|
| 30 | ${GTEST_DIR}/src/gtest_main.cc)
|
---|
| 31 |
|
---|
| 32 |
|
---|
| 33 | target_link_libraries(ArduinoJsonTests ArduinoJson)
|
---|
| 34 |
|
---|
| 35 | add_test(ArduinoJsonTests ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ArduinoJsonTests)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.