set(MLMC_TEST_LIBRARIES ${MLMC_LIBRARIES} ${MPP_TEST_LIBRARIES}) # ------- Create Directories ------- file(COPY ${PROJECT_SOURCE_DIR}/mlmc/conf DESTINATION ${CMAKE_BINARY_DIR}/mlmc/) file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/mlmc/tests/data/vtk) file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/mlmc/tests/data/py) file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/mlmc/tests/data/vtu) file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/mlmc/tests/log) # ------- Tests Macro ------- macro(add_mlmc_test testpath) # To remove pathnames infront of testname string(FIND ${testpath} "/" pos REVERSE) MATH(EXPR pos "${pos}+1") string(SUBSTRING ${testpath} ${pos} -1 testname) add_executable(${testname} ${testpath}.cpp) target_link_libraries(${testname} ${MLMC_TEST_LIBRARIES}) add_test(${testname} ${testname}) endmacro() # ------- Unit Tests ------- add_mlmc_test(basics/TestLevel) add_mlmc_test(basics/TestPlotMap) add_mlmc_test(problems/generators/TestRandomNumberManager) add_mlmc_test(problems/generators/TestCirculantEmbedding) add_mlmc_test(montecarlo/TestMonteCarlo) add_mlmc_test(pdesolver/TestPDESolver) add_mlmc_test(montecarlo/datastructure/TestEmpiricMeasureLevelMaps) add_mlmc_test(montecarlo/datastructure/TestExponents) add_mlmc_test(montecarlo/datastructure/TestErrors) # ------- Integration Tests ------- add_executable(TestMain TestMain.cpp) target_link_libraries(TestMain ${MLMC_TEST_LIBRARIES})