fixed adding file problem
[c11concurrency-benchmarks.git] / gdax-orderbook-hpp / demo / dependencies / rapidjson-1.1.0 / example / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.8)
2
3 if(POLICY CMP0054)
4   cmake_policy(SET CMP0054 NEW)
5 endif()
6
7 set(EXAMPLES
8     capitalize
9     condense
10     filterkey
11     filterkeydom
12     jsonx
13     messagereader
14     parsebyparts
15     pretty
16     prettyauto
17     schemavalidator
18     serialize
19     simpledom
20     simplereader
21     simplewriter
22     tutorial)
23     
24 include_directories("../include/")
25
26 add_definitions(-D__STDC_FORMAT_MACROS)
27
28 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
29     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -Werror -Wall -Wextra -Weffc++ -Wswitch-default")
30 elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
31     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Weffc++ -Wswitch-default -Wfloat-equal -Wimplicit-fallthrough -Weverything")
32 endif()
33
34 foreach (example ${EXAMPLES})
35     add_executable(${example} ${example}/${example}.cpp)
36 endforeach()
37
38 if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
39     target_link_libraries(parsebyparts pthread)
40 endif()
41
42 add_custom_target(examples ALL DEPENDS ${EXAMPLES})