Ill-defined targets when compiling rootana as a submodule
Issue #24
new
When you treat rootana as a submodule, there is a combination of instructions in CMakeLists.txt
that prevents compilation.
245 get_directory_property(PARENT_DIRECTORY PARENT_DIRECTORY)
246 if(NOT PARENT_DIRECTORY)
247 add_subdirectory(libAnalyzer)
248 add_subdirectory(libAnalyzerDisplay)
249 add_subdirectory(libMidasInterface)
250 add_subdirectory(libMidasServer)
251 add_subdirectory(old_analyzer)
252 endif()
[...]
260 install(
261 TARGETS event_dump event_skim
262 DESTINATION bin
263 )
The target event_dump
is defined in old_analyzer
, which is only included if there is no parent directory. Regardless of whether there is a parent directory, CMake wants to install it, so it fails:
CMake Error at packages/rootana/CMakeLists.txt:260 (install):
install TARGETS given target "event_dump" which does not exist.
An obvious solution would be to move lines 260-263 into the conditional, but I’m actually not sure what the reason behind this conditional is in the first place.