)
# Define a strip-comments target:
- ADD_CUSTOM_TARGET(strip-comments
- COMMAND perl -pi -e 's\#^[ \\t]*//.*\\n\#\#g;' ${TARGET_SRC}
- COMMENT "strip comments"
- )
+ FIND_PACKAGE(Perl QUIET)
+ IF(PERL_FOUND)
+ ADD_CUSTOM_TARGET(strip_comments
+ COMMAND ${PERL_EXECUTABLE} -pi -e 's\#^[ \\t]*//.*\\n\#\#g;' ${TARGET_SRC}
+ COMMENT "strip comments"
+ )
+ ENDIF()
# Print out some usage information:
MESSAGE(
#
# $ 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
+# and rerun the configure and generate phases of CMake
#
-# $ make strip-comments - strip the source files in this
+# $ make strip_comments - strip the source files in this
# directory off the documentation comments
-#
# $ make clean - to remove the generated executable as well as
# all intermediate compilation files
# $ make runclean - to remove all output generated by the program
# files (includes clean, runclean and the removal
# of the generated build system)
#
-# $ make edit_cache - to change (cached) configuration variables
-# and rerun the configure and generate phases of CMake
-#
# Have a nice day!
#
###"