include(${QT_USE_FILE})
include_directories(../../src/command)

set(test_file_list
	fittest.cpp
	plottest.cpp
)
create_test_sourcelist(command_tests commandtests.cpp ${test_file_list})

set(command_file_list
	../../src/command/fit.cpp
	../../src/command/fitmodifier.cpp
	../../src/command/fitrange.cpp
	../../src/command/plot.cpp
	../../src/command/plotmodifier.cpp
	../../src/command/plotrange.cpp
	../../src/command/plotstyle.cpp
	../../src/command/plottitle.cpp
)
add_executable(commandtests ${command_tests} ${command_file_list})
target_link_libraries(commandtests ${QT_LIBRARIES})

foreach (test_file ${test_file_list})
  get_filename_component(filename ${test_file} NAME_WE)
  add_test(${filename} commandtests ${filename})
endforeach (test_file)
