1 function(tutorials_copy_and_install extension file_permissions)
3 get_filename_component(TUTORIALS_MOD_DIR ${CMAKE_CURRENT_SOURCE_DIR} NAME)
5 file(GLOB files ${CMAKE_CURRENT_SOURCE_DIR}/${extension})
9 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${TUTORIALS_MOD_DIR}
10 FILE_PERMISSIONS ${file_permissions})
12 DESTINATION ${CMAKE_INSTALL_PREFIX}/${TUTORIALS_MOD_DIR}
13 PERMISSIONS ${file_permissions})
17 function(tutorials_add_executable target source)
18 if(MoFEM_PRECOMPILED_HEADRES)
19 set_source_files_properties(${source}
20 PROPERTIES COMPILE_FLAGS "-include ${PERCOMPILED_HEADER}")
21 endif(MoFEM_PRECOMPILED_HEADRES)
22 add_executable(${target} ${source})
23 endfunction(tutorials_add_executable)
25 function(tutorials_install tutorials_mod_dir)
27 get_filename_component(TUTORIALS_MOD_DIR ${CMAKE_CURRENT_SOURCE_DIR} NAME)
31 ${CMAKE_CURRENT_SOURCE_DIR}
33 ${CMAKE_INSTALL_PREFIX}/${TUTORIALS_MOD_DIR}
44 PATTERN "atom_tests" EXCLUDE)
45 endfunction(tutorials_install)
47 function(tutorials_build_and_install target source)
48 tutorials_add_executable(${target} ${source})
50 get_filename_component(TUTORIALS_MOD_DIR ${CMAKE_CURRENT_SOURCE_DIR} NAME)
52 target_link_libraries(${target}
62 mofem_boundary_conditions
63 ${MoFEM_PROJECT_LIBS})
64 install(TARGETS ${target}
65 DESTINATION ${CMAKE_INSTALL_PREFIX}/${TUTORIALS_MOD_DIR})
67 endfunction(tutorials_build_and_install)
69 set(MPI_RUN ${MoFEM_MPI_RUN})