IAP GITLAB

Skip to content
Snippets Groups Projects
CMakeLists.txt 1.18 KiB
Newer Older

# namespace of library -> location of header files
set (
  CORSIKAcascade_NAMESPACE
  corsika/cascade
  )

# header files of this library
set (
  CORSIKAcascade_HEADERS
  Cascade.h
  )

add_library (CORSIKAcascade INTERFACE)

CORSIKA_COPY_HEADERS_TO_NAMESPACE (CORSIKAcascade ${CORSIKAcascade_NAMESPACE} ${CORSIKAcascade_HEADERS})

#target_link_libraries (
#  CORSIKAcascade
#  CORSIKAparticles
#  CORSIKAunits
#  CORSIKAthirdparty # for catch2
#  )

# include directive for upstream code
target_include_directories (
  CORSIKAcascade
  INTERFACE
  $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
  $<INSTALL_INTERFACE:include/>
  )

# install library
install (
  FILES ${CORSIKAcascade_HEADERS}
  DESTINATION include/${CORSIKAcascade_NAMESPACE}
  )

# ----------------
# code unit testing
add_executable (
  testCascade
  testCascade.cc
  )

target_link_libraries (
  testCascade
  #  CORSIKAutls
  CORSIKArandom
ralfulrich's avatar
ralfulrich committed
  ProcessSibyll
  CORSIKAcascade
Felix Riehn's avatar
Felix Riehn committed
  CORSIKAstackinterface
  CORSIKAparticles
  CORSIKAgeometry
  CORSIKAenvironment
  CORSIKAprocesssequence
  CORSIKAunits
  CORSIKAthirdparty # for catch2
  )

add_test (
  NAME testCascade
  COMMAND testCascade
  )