1CMAKE_MINIMUM_REQUIRED(VERSION 3.4)
2PROJECT(guix_demo_compile_test)
3INCLUDE(DART)
4
5ENABLE_TESTING()
6
7#list test
8SET(TEST_SLN_FILE_LIST "")
9FILE(GLOB_RECURSE TEST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../../../../samples/*.vcxproj")
10LIST(APPEND TEST_SLN_FILE_LIST ${TEST_FILE})
11FILE(GLOB_RECURSE TEST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../../../../test/example_internal/*.vcxproj")
12LIST(APPEND TEST_SLN_FILE_LIST ${TEST_FILE})
13FILE(GLOB_RECURSE TEST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../../../../tutorials/*.vcxproj")
14LIST(APPEND TEST_SLN_FILE_LIST ${TEST_FILE})
15
16#add test
17FOREACH(TEST_FILE ${TEST_SLN_FILE_LIST})
18    FILE(RELATIVE_PATH TEST_NAME "${CMAKE_CURRENT_SOURCE_DIR}/../../../../" ${TEST_FILE})
19    ADD_TEST(${TEST_NAME} python ${CMAKE_CURRENT_SOURCE_DIR}/../test_main.py -p ${TEST_FILE} --compile_project --debug)
20    SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES TIMEOUT 600)
21ENDFOREACH()