CMakeLists.txt 1.19 KB
Newer Older
1
set(TEST_DEPENDENCIES "")
Thomas Witkowski's avatar
Thomas Witkowski committed
2
3
4
5

file(GLOB sources src/*.cc)
foreach(s ${sources})
  get_filename_component(swe ${s} NAME_WE)
6

Thomas Witkowski's avatar
Thomas Witkowski committed
7
  add_executable(${swe} ${s})
8
9
  target_link_libraries(${swe} amdis ${Boost_LIBRARIES})
  list(APPEND TEST_DEPENDENCIES ${swe})
Thomas Witkowski's avatar
Thomas Witkowski committed
10
11
endforeach(s)

12
13
14
15
16
17
18
19
20
21
22
23

add_test(NAME "RunTest0001" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND mpirun -np 16 test0001 test0001.dat.2d)
add_test(NAME "RunTest0002" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND mpirun -np 16 test0002 test0002.dat.2d)
add_test(NAME "RunTest0003" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND mpirun -np 16 test0003 test0003.dat.2d)
add_test(NAME "RunTest0004" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND mpirun -np 16 test0004 test0004.dat.2d)
add_test(NAME "RunTest0005" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND mpirun -np 16 test0005 test0005.dat.2d)
add_test(NAME "RunTest0006" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND mpirun -np 16 test0006 test0006.dat.2d)
add_test(NAME "RunTest0007" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND mpirun -np 4  test0007 test0007.dat.2d)


add_dependencies(check ${TEST_DEPENDENCIES})

Thomas Witkowski's avatar
Thomas Witkowski committed
24
25
#create the output dir
file(MAKE_DIRECTORY output)