From c3674101e72e6f8cc3c0917e5f3113dafaad758b Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Thu, 8 Feb 2024 22:32:33 -0500 Subject: [PATCH] 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. --- cmake/macros/macro_deal_ii_invoke_autopilot.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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() -- 2.39.5