[Kst] branches/work/kst/portto4/kst/cmake/tests

Peter Kümmel syntheticpp at gmx.net
Wed Jan 12 18:32:48 CET 2011


SVN commit 1214039 by kuemmel:

make test name more readable

 M  +5 -2      CMakeLists.txt  


--- branches/work/kst/portto4/kst/cmake/tests/CMakeLists.txt #1214038:1214039
@@ -7,16 +7,19 @@
 add_definitions(-DKST_USE_QTEST_MAIN)
 
 foreach(header ${test_headers})
-	get_filename_component(testname ${header} NAME_WE)
+	get_filename_component(filename ${header} NAME_WE)
+	string(REPLACE test test_ testname ${filename})
 	kst_init(${testname})
 	set(moc_file)
 	qt4_wrap_cpp(moc_file ${header} OPTIONS "-nw")
-	kst_add_executable(${kst_dir}/tests/${testname}.cpp ${header} ${moc_file})
+	kst_add_executable(${kst_dir}/tests/${filename}.cpp ${header} ${moc_file})
 	kst_link(kstcore kstmath ${QT_QTTEST_LIBRARY})
 	add_test(NAME ${testname} COMMAND ${testname})
 	message(STATUS "Adding test: ${testname}")
 endforeach()
 
+message(STATUS)
+
 # like done with qmake
 #add_subdirectory(allinone)
 


More information about the Kst mailing list