Skip to content
Snippets Groups Projects
Commit bcf35cf7 authored by Robert K's avatar Robert K
Browse files

[bugfix] make cmake work with 2.4 release.

parent 809eb6f2
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,10 @@ set(TESTS
# copy data to build source to make tests work
file(COPY alugrid.cfg grids DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
foreach(TEST ${TESTS})
dune_add_test(NAME ${TEST} SOURCES ${TEST}.cc LINK_LIBRARIES dunealugrid)
endforeach()
# dune 2.5 and higher
if(NOT (("${DUNE_COMMON_VERSION_MAJOR}" STREQUAL "2")
AND ("${DUNE_COMMON_VERSION_MINOR}" STREQUAL "4")))
foreach(TEST ${TESTS})
dune_add_test(NAME ${TEST} SOURCES ${TEST}.cc LINK_LIBRARIES dunealugrid)
endforeach()
endif()
......@@ -7,8 +7,21 @@ set(TESTS
test-ball-projection
)
foreach(TEST ${TESTS})
dune_add_test(NAME ${TEST} SOURCES ${TEST}.cc LINK_LIBRARIES dunealugrid)
endforeach()
# 2.5 and higher
if(NOT (("${DUNE_COMMON_VERSION_MAJOR}" STREQUAL "2")
AND ("${DUNE_COMMON_VERSION_MINOR}" STREQUAL "4")))
foreach(TEST ${TESTS})
dune_add_test(NAME ${TEST} SOURCES ${TEST}.cc LINK_LIBRARIES dunealugrid)
endforeach()
else()
# dune 2.4
dune_register_package_flags(LIBRARIES "${DUNE_ALUGRID_LIBRARY}"
INCLUDE_DIRS "${DUNE_ALUGRID_INCLUDEDIRS}")
foreach(TEST ${TESTS})
add_executable(${TEST} ${TEST}.cc)
dune_target_enable_all_packages( ${TEST} )
endforeach()
endif()
add_subdirectory(dgf)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment