diff options
author | TravisBot <> | 2017-09-21 23:32:46 +0000 |
---|---|---|
committer | TravisBot <> | 2017-09-21 23:32:46 +0000 |
commit | 1a8ec165031af3b860028ef1b360acc8e7baf9e6 (patch) | |
tree | b9d2e956005b4de847417baf4a66ab3f028f1bc1 /CMakeLists.txt | |
parent | f5ecbc445977654e84120b3b02a9fe5d86dae5c8 (diff) | |
download | YAGE-1a8ec165031af3b860028ef1b360acc8e7baf9e6.tar.gz YAGE-1a8ec165031af3b860028ef1b360acc8e7baf9e6.zip |
Rebuilding documentation
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..cc3f12ab --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,41 @@ +cmake_minimum_required(VERSION 3.0) + +# yage library cmakelists.txt +project(YetAnotherGameEngine) + +# set standard +set(CMAKE_CXX_STANDARD 14) + +# set the test sources +set(YAGE_TEST_DIR ${PROJECT_SOURCE_DIR}/tests) + +# set binary directory +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) + +# find libraries +find_package(OpenGL REQUIRED) + +# adding libraries +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/lib) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/yage) + +if($ENV{UNIT_TESTS}) + # enable tests + enable_testing() + set(SIMULATION_RUNS 1000) + + function(make_test test_name cycles) + add_executable(${test_name} ${YAGE_TEST_DIR}/${test_name}.cpp) + target_link_libraries(${test_name} + gtest_main + yage) + add_test(NAME ${test_name} COMMAND ${test_name} --gtest_repeat=${cycles} --gtest_break_on_failure) + endfunction(make_test) + + make_test(yagetest 1) + make_test(matrixtest ${SIMULATION_RUNS}) + make_test(particlebodytest ${SIMULATION_RUNS}) + make_test(windowtest ${SIMULATION_RUNS}) +endif() |