CMakeLists.txt 1.2 KB
Newer Older
Radu Popescu's avatar
Radu Popescu committed
1
2
3
4
5
6
7
8
9
10
11
# Add the executable
add_executable (test_ADRAssembler EXCLUDE_FROM_ALL main.cpp)
target_link_libraries (test_ADRAssembler ${LIBS})

add_custom_target (test_ADRAssembler_links
                   COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/data;data
                   VERBATIM)

# Fake dependency to ensure that links are made prior to running the test
add_dependencies (test_ADRAssembler DEPENDS test_ADRAssembler_links)

fumagalli's avatar
fumagalli committed
12
13
14
15
16
# Add the executable
add_executable (test_ADRAssembler_2d EXCLUDE_FROM_ALL main_2d.cpp)
target_link_libraries (test_ADRAssembler_2d ${LIBS})

add_custom_target (test_ADRAssembler_2d_links
Antonio Cervone's avatar
Antonio Cervone committed
17
18
                   COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/data_2d;data_2d
                   COMMAND ${CMAKE_COMMAND} -E create_symlink ${PROJECT_SOURCE_DIR}/testsuite/data/mesh/freefem/;Mesh/freefem
fumagalli's avatar
fumagalli committed
19
20
21
22
23
24
                   VERBATIM)

# Fake dependency to ensure that links are made prior to running the test
add_dependencies (test_ADRAssembler_2d DEPENDS test_ADRAssembler_2d_links)

add_test (NAME LifeSolver::ADRAssembler COMMAND mpirun -np 2 test_ADRAssembler)
Antonio Cervone's avatar
Antonio Cervone committed
25
add_test (NAME LifeSolver::ADRAssembler_2D COMMAND mpirun -np 2 test_ADRAssembler_2d -f data_2d )