# TARGET - a string used for the project and target name
# TARGET_SRC - a list of source file to compile for target
# ${TARGET}
+# TARGET_RUN - (optional) the command line that should be
+# invoked by "make run", will be set to default
+# values if empty
# CLEAN_UP_FILES - (optional) a list of files (globs) that will be
# removed with "make runclean" and "make
# distclean", will be set to default values if
# empty
-# RUN_COMMAND - (optional) the command line that should be
-# invoked by "make run", will be set to default
-# values if empty
#
MACRO(DEAL_II_INVOKE_AUTOPILOT)
MESSAGE(STATUS "Autopilot invoked")
# Define a custom target to easily run the program:
- IF("${RUN_COMMAND}" STREQUAL "")
- SET(RUN_COMMAND ${TARGET})
+ IF("${TARGET_RUN}" STREQUAL "")
+ SET(TARGET_RUN ${TARGET})
ENDIF()
ADD_CUSTOM_TARGET(run
- COMMAND ${RUN_COMMAND}
- COMMENT "Run ${TARGET} compiled with ${CMAKE_BUILD_TYPE} configuration in ${CMAKE_SOURCE_DIR}"
+ COMMAND ${TARGET_RUN}
+ DEPENDS ${TARGET}
+ COMMENT "Run ${TARGET} with ${CMAKE_BUILD_TYPE} configuration"
)
# Define custom targets to easily switch the build type:
# You can specify additional files here!
)
+# A custom command line to run the program
+SET(TARGET_RUN mpirun -np 2 ${TARGET})
+
+# Define the output that should be cleaned:
+SET(CLEAN_UP_FILES *.vtu *.pvtu *.visit)
+
# Usually, you will not need to modify anything beyond this point...
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
#
# Are all dependencies fullfilled?
#
-IF(NOT DEAL_II_WITH_P4EST OR NOT DEAL_II_WITH_TRILINOS)
+IF( NOT DEAL_II_WITH_MPI OR
+ NOT DEAL_II_WITH_P4EST OR
+ NOT DEAL_II_WITH_TRILINOS )
MESSAGE(FATAL_ERROR "
Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
+ DEAL_II_WITH_MPI = ON
DEAL_II_WITH_P4EST = ON
DEAL_II_WITH_TRILINOS = ON
which is required for this tutorial step."
# You can specify additional files here!
)
+# A custom command line to run the program
+SET(TARGET_RUN ${TARGET} input.prm)
+
# Usually, you will not need to modify anything beyond this point...
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
# You can specify additional files here!
)
+# A custom command line to run the program
+SET(TARGET_RUN mpirun -np 2 ${TARGET})
+
+# Define the output that should be cleaned:
+SET(CLEAN_UP_FILES *.vtu *.pvtu *.visit)
+
# Usually, you will not need to modify anything beyond this point...
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
#
# Are all dependencies fullfilled?
#
-IF( NOT DEAL_II_WITH_P4EST OR
+IF( NOT DEAL_II_WITH_MPI OR
+ NOT DEAL_II_WITH_P4EST OR
NOT DEAL_II_WITH_TRILINOS )
MESSAGE(FATAL_ERROR "
Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
+ DEAL_II_WITH_MPI = ON
DEAL_II_WITH_P4EST = ON
DEAL_II_WITH_TRILINOS = ON
which is required for this tutorial step."