diff --git a/CMakeLists.txt b/CMakeLists.txt index bc4811db47b..e167bb8097f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,20 +59,19 @@ if(MODIFY_ROOTMAP) # Define the custom command to search and replace in-place add_custom_command( - OUTPUT "${GENERATED_FILE_PATH}.edited" # Declare the generated file as output + OUTPUT "${GENERATED_FILE_PATH}.bak" # Declare the generated file as output DEPENDS "${GENERATED_FILE_PATH}" # Ensure it depends on the original generated file - COMMAND sed -i.edited -e "/class RooParamKeysPdf/d" + COMMAND sed -i.bak -e "/class RooParamKeysPdf/d" -e "/class RooStarMomentMorph/d" -e "/class RooStats::HistFactory::RooBSpline/d" -e "/class RooStats::HistFactory::RooBSplineBases/d" "${GENERATED_FILE_PATH}" - #COMMAND touch "${GENERATED_FILE_PATH}.edited" COMMENT "Removing conflicting classes from generated rootmap" ) # Define a custom target that depends on the custom command output add_custom_target( ModifyRootmapFile # Name of the custom target - DEPENDS "${GENERATED_FILE_PATH}.edited" # Ensure the custom command is executed + DEPENDS "${GENERATED_FILE_PATH}.bak" # Ensure the custom command is executed ) # Add the custom target as a dependency to another target to ensure it's built