summaryrefslogtreecommitdiffstats
path: root/src/rapidjson/example/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
commit483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch)
treee5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/rapidjson/example/CMakeLists.txt
parentInitial commit. (diff)
downloadceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.tar.xz
ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.zip
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/rapidjson/example/CMakeLists.txt')
-rw-r--r--src/rapidjson/example/CMakeLists.txt42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/rapidjson/example/CMakeLists.txt b/src/rapidjson/example/CMakeLists.txt
new file mode 100644
index 00000000..4d448ccc
--- /dev/null
+++ b/src/rapidjson/example/CMakeLists.txt
@@ -0,0 +1,42 @@
+cmake_minimum_required(VERSION 2.8)
+
+if(POLICY CMP0054)
+ cmake_policy(SET CMP0054 NEW)
+endif()
+
+set(EXAMPLES
+ capitalize
+ condense
+ filterkey
+ filterkeydom
+ jsonx
+ messagereader
+ parsebyparts
+ 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} -pthread -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")
+endif()
+
+foreach (example ${EXAMPLES})
+ add_executable(${example} ${example}/${example}.cpp)
+endforeach()
+
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ target_link_libraries(parsebyparts pthread)
+endif()
+
+add_custom_target(examples ALL DEPENDS ${EXAMPLES})