diff options
author | Alec Thomas <alec@swapoff.org> | 2013-04-02 00:19:30 -0400 |
---|---|---|
committer | Alec Thomas <alec@swapoff.org> | 2013-04-02 14:06:24 -0400 |
commit | e569dc47c9ff3c3118cb96427d3ec9a6aced98aa (patch) | |
tree | 65e5bce42f0950faca74c1e270b7ea6e45df8c31 /CMakeLists.txt | |
parent | 800ca63c81d3501b84eb625a273847b2ad6e1f19 (diff) |
Add support for Travis-CI.
Also ditched glog.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 257bb99..9200f8c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 2.8) project(EntityX) include_directories(${CMAKE_CURRENT_LIST_DIR}) +set(RUN_BENCHMARKS false CACHE BOOL "Run benchmarks") + include(${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) # C++11 feature checks include(CheckCXX11Features.cmake) @@ -21,7 +23,6 @@ macro(create_test TARGET_NAME SOURCE) target_link_libraries( ${TARGET_NAME} entityx - glog gtest gtest_main ${Boost_LIBRARIES} @@ -66,7 +67,6 @@ add_library(entityx_shared SHARED ${sources}) target_link_libraries( entityx_shared ${Boost_SIGNALS_LIBRARY} - glog ) set_target_properties(entityx_shared PROPERTIES OUTPUT_NAME entityx) @@ -85,7 +85,12 @@ if (BUILD_TESTING) create_test(component_test entityx/Components_test.cc) create_test(event_test entityx/Event_test.cc) create_test(system_test entityx/System_test.cc) - create_test(benchmarks_test entityx/Benchmarks_test.cc) + if (RUN_BENCHMARKS) + message("-- Running benchmarks") + create_test(benchmarks_test entityx/Benchmarks_test.cc) + else () + message("-- Not running benchmarks (use -DRUN_BENCHMARKS=1 to enable)") + endif () endif (BUILD_TESTING) file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/entityx/*.h") |