)
# Define custom targets to easily switch the build type:
- ADD_CUSTOM_TARGET(debug
- COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug ${CMAKE_SOURCE_DIR}
- COMMENT "Switch CMAKE_BUILD_TYPE to Debug"
- )
- ADD_CUSTOM_TARGET(release
- COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release ${CMAKE_SOURCE_DIR}
- COMMENT "Switch CMAKE_BUILD_TYPE to Release"
- )
+ IF(${DEAL_II_BUILD_TYPE} MATCHES "Debug")
+ ADD_CUSTOM_TARGET(debug
+ COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug ${CMAKE_SOURCE_DIR}
+ COMMENT "Switch CMAKE_BUILD_TYPE to Debug"
+ )
+ SET(_switch_targets
+ "# $ make debug - to switch the build type to \"Debug\"\n"
+ )
+ ENDIF()
+ IF(${DEAL_II_BUILD_TYPE} MATCHES "Release")
+ ADD_CUSTOM_TARGET(release
+ COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release ${CMAKE_SOURCE_DIR}
+ COMMENT "Switch CMAKE_BUILD_TYPE to Release"
+ )
+ SET(_switch_targets ${_switch_targets}
+ "# $ make release - to switch the build type to \"Release\"\n"
+ )
+ ENDIF()
# And another custom target to clean up all files generated by the program:
IF("${CLEAN_UP_FILES}" STREQUAL "")
# You can now run
# $ make - to compile and link the program
# $ make run - to (compile, link and) run the program
-#
-# $ make debug - to switch the build type to \"Debug\"
-# $ make release - to switch the build type to \"Release\"
-# $ make edit_cache - to change (cached) configuration variables
+#\n"
+${_switch_targets}
+"# $ make edit_cache - to change (cached) configuration variables
# and rerun the configure and generate phases of CMake
#
# $ make strip_comments - strip the source files in this