Warning, /graphics/kst-plot/tests/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 project(ksttests)
0002 
0003 file(GLOB test_headers ${kst_dir}/tests/*.h)
0004 
0005 list(REMOVE_ITEM test_headers ${kst_dir}/tests/ksttest.h)
0006 
0007 kst_include_directories(core math)
0008 
0009 add_definitions(-DKST_USE_QTEST_MAIN -DKST_SRC_DIR=${kst_dir})
0010 
0011 
0012 foreach(header ${test_headers})
0013     get_filename_component(filename ${header} NAME_WE)
0014     string(REPLACE test test_ testname ${filename})
0015     if(kst_verbose)
0016         message(STATUS "Building test ${testname}")
0017     endif()
0018 
0019     kst_init(${testname} "")
0020 
0021     set(moc_file)
0022     qt4_wrap_cpp(moc_file ${header} OPTIONS "-nw")
0023 
0024     kst_add_executable(
0025         ${kst_dir}/tests/ksttest.h
0026         ${kst_dir}/tests/${filename}.cpp
0027         ${header} ${moc_file})
0028 
0029     kst_link(${libcore} ${libmath} ${QT_QTTEST_LIBRARY})
0030 
0031     add_test(NAME ${testname} COMMAND ${testname})
0032 
0033     # Some file grouping in Studio
0034     kst_flat_source_group()
0035     source_group(Generated FILES ${moc_file})
0036 endforeach()
0037 
0038 message(STATUS)
0039 message(STATUS "Tests added, to run them call 'make test'")
0040 message(STATUS)
0041 
0042 # TODO all in one executable
0043 #kst_init(${kst_binary_name} tests)
0044 #kst_files_find(tests)
0045 #kst_include_directories(core math)
0046 #remove_definitions(-DKST_USE_QTEST_MAIN)
0047 #kst_add_executable()
0048 #kst_link(${libcore} ${libmath} ${QT_QTTEST_LIBRARY})
0049 
0050 
0051 if(WIN32)
0052     add_subdirectory(realloc)
0053 endif()
0054 add_subdirectory(datasources/ascii)
0055 
0056 
0057 
0058