diff options
author | 2016-02-21 11:48:45 +0100 | |
---|---|---|
committer | 2016-02-21 11:48:45 +0100 | |
commit | cc24a339d8c0517259084b5c178d784626ba965c (patch) | |
tree | 9868e9687b5802ae0a3733712a3bbeb3bc75c953 /3rdparty/rapidjson/example/CMakeLists.txt | |
parent | b5daabda5495dea5c50e17961ecfed2ea8619d76 (diff) |
Merge remote-tracking branch 'refs/remotes/mamedev/master'
Second attempt
Diffstat (limited to '3rdparty/rapidjson/example/CMakeLists.txt')
-rw-r--r-- | 3rdparty/rapidjson/example/CMakeLists.txt | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/3rdparty/rapidjson/example/CMakeLists.txt b/3rdparty/rapidjson/example/CMakeLists.txt new file mode 100644 index 00000000000..c6b8449ffb1 --- /dev/null +++ b/3rdparty/rapidjson/example/CMakeLists.txt @@ -0,0 +1,36 @@ +# Copyright (c) 2011 Milo Yip (miloyip@gmail.com) +# Copyright (c) 2013 Rafal Jeczalik (rjeczalik@gmail.com) +# Distributed under the MIT License (see license.txt file) +cmake_minimum_required(VERSION 2.8) + +set(EXAMPLES + capitalize + condense + jsonx + messagereader + pretty + prettyauto + schemavalidator + serialize + simpledom + simplereader + simplewriter + tutorial) + +include_directories("../include/") + +add_definitions(-D__STDC_FORMAT_MACROS) + +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Weffc++ -Wswitch-default") +elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -Weffc++ -Wswitch-default -Wfloat-equal -Wimplicit-fallthrough -Weverything") +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + add_definitions(-D_CRT_SECURE_NO_WARNINGS=1) +endif() + +foreach (example ${EXAMPLES}) + add_executable(${example} ${example}/${example}.cpp) +endforeach() + +add_custom_target(examples ALL DEPENDS ${EXAMPLES}) |