Mercurial > thymian
comparison tests/CMakeLists.txt @ 0:a4671277546c tip
created the repository for the thymian project
| author | ferencd |
|---|---|
| date | Tue, 17 Aug 2021 11:19:54 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:a4671277546c |
|---|---|
| 1 add_subdirectory(gtest) | |
| 2 | |
| 3 include_directories( | |
| 4 ../templates | |
| 5 ./gtest/include | |
| 6 ../web | |
| 7 ${CMAKE_CURRENT_SOURCE_DIR} | |
| 8 ../script/inc | |
| 9 ../script/vm | |
| 10 ../script/runtime | |
| 11 ../script/compiler ./gtest/include | |
| 12 ${CMAKE_CURRENT_SOURCE_DIR} | |
| 13 ) | |
| 14 | |
| 15 if(SCRIPTED_TEMPLATES) | |
| 16 | |
| 17 add_executable(vmtest | |
| 18 ${CMAKE_CURRENT_SOURCE_DIR}/code_exec.cpp | |
| 19 ${CMAKE_CURRENT_SOURCE_DIR}/scripttest.cpp | |
| 20 ${CMAKE_CURRENT_SOURCE_DIR}/var_def.cpp | |
| 21 ${CMAKE_BINARY_DIR}/tests/gen_test.cpp | |
| 22 ${CMAKE_CURRENT_SOURCE_DIR}/gtest/src/gtest_main.cc | |
| 23 ) | |
| 24 | |
| 25 add_dependencies(vmtest testgen) | |
| 26 | |
| 27 if(WIN32) | |
| 28 add_definitions("/D_VARIADIC_MAX=10") | |
| 29 endif() | |
| 30 | |
| 31 if(WIN32) | |
| 32 add_custom_command( | |
| 33 MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/generated.cpp | |
| 34 OUTPUT ${CMAKE_BINARY_DIR}/tests/gen_test.cpp | |
| 35 COMMAND testgen | |
| 36 COMMENT "Running TESTGEN" | |
| 37 VERBATIM | |
| 38 ) | |
| 39 else() | |
| 40 add_custom_command( | |
| 41 MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/generated.cpp | |
| 42 OUTPUT ${CMAKE_BINARY_DIR}/tests/gen_test.cpp | |
| 43 COMMAND ${CMAKE_BINARY_DIR}/bin/testgen | |
| 44 COMMENT "Running TESTGEN: ${CMAKE_BINARY_DIR}/bin/testgen" | |
| 45 VERBATIM | |
| 46 ) | |
| 47 endif() | |
| 48 | |
| 49 | |
| 50 include_directories(${CMAKE_BINARY_DIR}/compiler | |
| 51 ${CMAKE_BINARY_DIR}/runtime | |
| 52 ) | |
| 53 | |
| 54 target_link_libraries(vmtest nap_rt nap_bci_s nap_cpl_s gtest) | |
| 55 | |
| 56 endif() | |
| 57 | |
| 58 add_executable(templ_test | |
| 59 ${CMAKE_CURRENT_SOURCE_DIR}/test.cpp | |
| 60 ${CMAKE_CURRENT_SOURCE_DIR}/gtest/googletest/src/gtest_main.cc | |
| 61 ) | |
| 62 | |
| 63 | |
| 64 target_link_libraries(templ_test ${CONAN_LIBS} common gtest templater cppdb pthread ) |
