source: rtos_arduino/trunk/arduino_lib/libraries/ArduinoJson/src/CMakeLists.txt@ 209

Last change on this file since 209 was 209, checked in by ertl-honda, 8 years ago

BlueMix用のフィアルを追加

File size: 1.5 KB
Line 
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
8file(GLOB_RECURSE HPP_FILES ../include/*.hpp)
9file(GLOB_RECURSE IPP_FILES ../include/*.ipp)
10file(GLOB_RECURSE CPP_FILES *.cpp)
11
12if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
13 add_compile_options(
14 -fno-exceptions
15 -fno-rtti
16 -pedantic
17 -Wall
18 -Wcast-align
19 -Wcast-qual
20 -Wconversion
21 -Wctor-dtor-privacy
22 -Wdisabled-optimization
23 -Werror
24 -Wextra
25 -Wformat=2
26 -Winit-self
27 -Wmissing-include-dirs
28 -Wno-parentheses
29 -Wno-sign-conversion
30 -Wno-unused
31 -Wno-variadic-macros
32 -Wnon-virtual-dtor
33 -Wold-style-cast
34 -Woverloaded-virtual
35 -Wredundant-decls
36 -Wshadow
37 -Wsign-promo
38 -Wstrict-overflow=5
39 -Wundef
40 )
41endif()
42
43if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
44 add_compile_options(
45 -Wstrict-null-sentinel
46 )
47
48 if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.5)
49 add_compile_options(-Wlogical-op) # the flag exists in 4.4 but is buggy
50 endif()
51
52 if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.6)
53 add_compile_options(-Wnoexcept)
54 endif()
55endif()
56
57if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
58 add_compile_options(
59 -Wc++11-compat
60 -Wdeprecated-register
61 )
62endif()
63
64if(MSVC)
65 add_definitions(-D_CRT_SECURE_NO_WARNINGS)
66 add_compile_options(-W4)
67endif()
68
69add_library(ArduinoJson ${CPP_FILES} ${HPP_FILES} ${IPP_FILES})
70
71target_include_directories(ArduinoJson INTERFACE ${CMAKE_CURRENT_LIST_DIR}/../include)
Note: See TracBrowser for help on using the repository browser.