# This file is part of GTI (Generic Tool Infrastructure)
#
# Copyright (C)
#   2008-2019 ZIH, Technische Universitaet Dresden, Federal Republic of Germany
#   2008-2019 Lawrence Livermore National Laboratories, United States of America
#   2013-2019 RWTH Aachen University, Federal Republic of Germany
#
# See the LICENSE file in the package base directory for details

##
# @file CMakeLists.cmake
#       CMake file for utility directory.
#
# @author Tobias Hilbrich
# @date 18.07.2012

add_executable(gti-tool-dummy tool-dummy.cpp)
add_executable(GTI::gti-tool-dummy ALIAS gti-tool-dummy)

target_link_libraries(gti-tool-dummy gti-modules MPI::MPI_CXX pnmpi)
target_include_directories(gti-tool-dummy PRIVATE 
        ${PROJECT_SOURCE_DIR}/modules/comm-protocols
        ${PROJECT_BINARY_DIR}/modules/common
        )
target_include_directories(gti-tool-dummy SYSTEM PRIVATE
        ${PROJECT_BINARY_DIR}/externals/PnMPI
        ${PROJECT_SOURCE_DIR}/externals/PnMPI/src/pnmpi
        ${PROJECT_BINARY_DIR}/externals/PnMPI/src/pnmpi/header
        )

install(TARGETS gti-tool-dummy 
        EXPORT tool-dummy 
        RUNTIME DESTINATION bin)
install(EXPORT tool-dummy
        NAMESPACE GTI::
        DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/cmake/GTI)

OPTION (GTI_BUILD_PROFILE_EVALUATOR "Adds GTI's evaluator for its profiling data to the build, experimental." False)

ADD_SUBDIRECTORY (profile-evaluator)

#===================================
# Configure helper script to generate the annotation header. Needs python3.
# Should be executed during the build process of the tool using GTI.
#===================================
IF (GTI_ENABLE_ANNOTATIONS)
    CONFIGURE_FILE(generate_annotation_header.py ${CMAKE_CURRENT_BINARY_DIR}/generate_annotation_header.py @ONLY)
ENDIF (GTI_ENABLE_ANNOTATIONS)