CMakeLists.txt 834 B

12345678910111213141516171819202122232425262728
  1. set(PERFTEST_SOURCES
  2. misctest.cpp
  3. perftest.cpp
  4. platformtest.cpp
  5. rapidjsontest.cpp
  6. schematest.cpp)
  7. add_executable(perftest ${PERFTEST_SOURCES})
  8. target_link_libraries(perftest ${TEST_LIBRARIES})
  9. add_dependencies(tests perftest)
  10. find_program(CCACHE_FOUND ccache)
  11. if(CCACHE_FOUND)
  12. set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
  13. set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
  14. if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  15. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -fcolor-diagnostics")
  16. endif()
  17. endif(CCACHE_FOUND)
  18. set_property(DIRECTORY PROPERTY COMPILE_OPTIONS ${EXTRA_CXX_FLAGS})
  19. IF(NOT (CMAKE_BUILD_TYPE STREQUAL "Debug"))
  20. add_test(NAME perftest
  21. COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/perftest
  22. WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
  23. ENDIF()