Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
will-cern authored May 7, 2024
1 parent 29d7f7e commit 57320ac
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 57320ac

Please sign in to comment.