Skip to content

Commit 69f1fd1

Browse files
f3schdavidrohr
authored andcommitted
ITS3: Fix APTS response file generation
Was unnecessarily generated on every built.
1 parent e786dc0 commit 69f1fd1

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

Detectors/Upgrades/ITS3/data/CMakeLists.txt

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,26 @@
99
# granted to it by virtue of its status as an Intergovernmental Organization
1010
# or submit itself to any jurisdiction.
1111

12+
set(APTS_RESPONSE_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/APTSResponseData.root")
13+
14+
add_custom_command(
15+
OUTPUT ${APTS_RESPONSE_OUTPUT}
16+
COMMAND ${CMAKE_BINARY_DIR}/stage/bin/o2-alpide-response-generator
17+
-c APTS
18+
-i ${ITSRESPONSE_DIR}/response/ITS3ChipResponseData/AptsResponseData/
19+
-o ${CMAKE_CURRENT_BINARY_DIR}/
20+
DEPENDS GenerateAlpideResponse
21+
${ITSRESPONSE_DIR}/response/ITS3ChipResponseData/AptsResponseData/
22+
COMMENT "Generating APTSResponseData.root"
23+
VERBATIM
24+
)
25+
1226
add_custom_target(
1327
GenerateAPTSResponse ALL
14-
COMMAND
15-
${CMAKE_BINARY_DIR}/stage/bin/o2-alpide-response-generator -c APTS -i
16-
${ITSRESPONSE_DIR}/response/ITS3ChipResponseData/AptsResponseData/ -o
17-
${CMAKE_CURRENT_BINARY_DIR}/
18-
BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/APTSResponseData.root
19-
DEPENDS GenerateAlpideResponse
20-
COMMENT "Generating APTSResponseData.root")
28+
DEPENDS ${APTS_RESPONSE_OUTPUT}
29+
)
30+
2131
install(
22-
FILES "${CMAKE_CURRENT_BINARY_DIR}/APTSResponseData.root"
23-
DESTINATION
24-
"${CMAKE_INSTALL_PREFIX}/share/Detectors/Upgrades/ITS3/data/ITS3ChipResponseData/"
32+
FILES ${APTS_RESPONSE_OUTPUT}
33+
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/Detectors/Upgrades/ITS3/data/ITS3ChipResponseData/"
2534
)

0 commit comments

Comments
 (0)