From: Timo Heister Date: Fri, 9 Feb 2024 03:32:33 +0000 (-0500) Subject: fix strip_comments target X-Git-Tag: relicensing~58^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16612%2Fhead;p=dealii.git fix strip_comments target The ``strip_comments`` target only worked for in-source builds. Fix the CMake logic to make it work with separate build directories. --- diff --git a/cmake/macros/macro_deal_ii_invoke_autopilot.cmake b/cmake/macros/macro_deal_ii_invoke_autopilot.cmake index d5240f94f7..8c2925a079 100644 --- a/cmake/macros/macro_deal_ii_invoke_autopilot.cmake +++ b/cmake/macros/macro_deal_ii_invoke_autopilot.cmake @@ -216,11 +216,11 @@ macro(deal_ii_invoke_autopilot) COMMENT "distclean invoked" ) - # Define a strip-comments target: + # Define a strip_comments target: find_package(Perl QUIET) if(PERL_FOUND) add_custom_target(strip_comments - COMMAND ${PERL_EXECUTABLE} -pi -e 's\#^[ \\t]*//.*\\n\#\#g;' ${TARGET_SRC} + COMMAND ${PERL_EXECUTABLE} -pi -e 's\#^[ \\t]*//.*\\n\#\#g;' ${CMAKE_SOURCE_DIR}/${TARGET_SRC} COMMENT "strip comments" ) endif()