# ---------------------------------------------------------------------- # File: CMakeLists.txt # Author: Elvin-Alin Sindrilaru # ---------------------------------------------------------------------- # ************************************************************************ # * EOS - the CERN Disk Storage System * # * Copyright (C) 2019 CERN/Switzerland * # * * # * This program is free software: you can redistribute it and/or modify * # * it under the terms of the GNU General Public License as published by * # * the Free Software Foundation, either version 3 of the License, or * # * (at your option) any later version. * # * * # * This program is distributed in the hope that it will be useful, * # * but WITHOUT ANY WARRANTY; without even the implied warranty of * # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * # * GNU General Public License for more details. * # * * # * You should have received a copy of the GNU General Public License * # * along with this program. If not, see .* # ************************************************************************ #------------------------------------------------------------------------------- # Search for dependencies #------------------------------------------------------------------------------- find_program(DOT_EXE "dot") if(DOT_EXE) message(STATUS "dot found: ${DOT_EXE}") else() message(STATUS "dot not found!") endif() set(DOT_OUTPUT_TYPE "pdf" CACHE STRING "Build a dependency graph. Options are dot output types: ps, png, pdf..." ) if(DOT_EXE) add_custom_target(dependency-graph COMMAND ${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR} --graphviz=${CMAKE_BINARY_DIR}/graphviz/${PROJECT_NAME}.dot COMMAND ${DOT_EXE} -T${DOT_OUTPUT_TYPE} ${CMAKE_BINARY_DIR}/graphviz/${PROJECT_NAME}.dot -o ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.${DOT_OUTPUT_TYPE}) add_custom_command( TARGET dependency-graph POST_BUILD COMMAND ; COMMENT "Dependency graph generated and located at ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.${DOT_OUTPUT_TYPE}") endif()