summaryrefslogtreecommitdiffstats
path: root/src/rapidjson/test/perftest/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/rapidjson/test/perftest/CMakeLists.txt')
-rw-r--r--src/rapidjson/test/perftest/CMakeLists.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/rapidjson/test/perftest/CMakeLists.txt b/src/rapidjson/test/perftest/CMakeLists.txt
new file mode 100644
index 000000000..c33aae469
--- /dev/null
+++ b/src/rapidjson/test/perftest/CMakeLists.txt
@@ -0,0 +1,26 @@
+set(PERFTEST_SOURCES
+ misctest.cpp
+ perftest.cpp
+ platformtest.cpp
+ rapidjsontest.cpp
+ schematest.cpp)
+
+add_executable(perftest ${PERFTEST_SOURCES})
+target_link_libraries(perftest ${TEST_LIBRARIES})
+
+add_dependencies(tests perftest)
+
+find_program(CCACHE_FOUND ccache)
+if(CCACHE_FOUND)
+ set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
+ set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -fcolor-diagnostics")
+ endif()
+endif(CCACHE_FOUND)
+
+IF(NOT (CMAKE_BUILD_TYPE STREQUAL "Debug"))
+add_test(NAME perftest
+ COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/perftest
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
+ENDIF()