]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix strip_comments target 16612/head
authorTimo Heister <timo.heister@gmail.com>
Fri, 9 Feb 2024 03:32:33 +0000 (22:32 -0500)
committerTimo Heister <timo.heister@gmail.com>
Fri, 9 Feb 2024 03:32:33 +0000 (22:32 -0500)
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

index d5240f94f76ae1974e5424a9be14d160134be6bb..8c2925a0794e3d5907b8ec727e00e9f472223279 100644 (file)
@@ -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()

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.