Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit d153d6e3 authored by Pierre Aubert's avatar Pierre Aubert
Browse files

Add very base of performance test project

parents
build
build2
.kdev4/
.tmp_project/
*.kdev4
project(Phoenix)
cmake_minimum_required(VERSION 2.8)
add_subdirectory(cmake)
phoenix_base_project("PhoenixPerformance" "1.4.1"
"Set of performance test"
"https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS/PhoenixPerformance")
pull_extra_module("MicroBenchmark" "https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS/MicroBenchmark.git")
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
add_subdirectory(src)
if(SELF_TESTS_MODE)
include(CTest)
add_subdirectory(TESTS)
endif(SELF_TESTS_MODE)
set(PHOENIX_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src;${PHOENIX_INCLUDE_DIRS}" CACHE INTERNAL "list of Phoenix include dirs")
![PLIBS_9 logo](doc/logo.png)
----
# Code
https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS/PhoenixPerformance
# Documentation
https://cta-lapp.pages.in2p3.fr//PHOENIX_LIBS/PhoenixPerformance/
# Requirements
- c++ compiler >=5.3.1
- cmake > 3
- make
# Installation for Users
$ git clone https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS/PhoenixPerformance.git
$ cd PhoenixPerformance
$ ./install.sh
project(Phoenix)
cmake_minimum_required(VERSION 2.8)
project(Phoenix)
cmake_minimum_required(VERSION 2.8)
include(createLinuxPackages.cmake)
include(phoenix_base_project.cmake)
if(NOT MODULE_MODE)
include(rpath_utils.cmake)
include(pull_extra_module.cmake)
include(create_doc.cmake)
include(create_find_project.cmake)
endif()
# Commands to create debian package with cmake
function(createLinuxPackages)
if(NOT MODULE_MODE)
set(CPACK_PACKAGE_NAME "${PROGRAM_NAME}" CACHE STRING "Name of the program")
set(CPACK_PACKAGE_VERSION "${PROGRAM_VERSION}" CACHE STRING "Version of the program")
set(CPACK_PACKAGE_VENDOR "Pierre Aubert" CACHE STRING "Vendor of the program")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${PROGRAM_DESCRIPTION_NO_QUOTE} CACHE STRING "Description of the program")
set(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README.md CACHE STRING "DOC of the program")
set(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_SOURCE_DIR}/README.md CACHE STRING "Welcome of the program")
set(CPACK_PACKAGE_HOMEPAGE_URL ${PROGRAM_HOMEPAGE} CACHE STRING "Homepage of the program")
set(CPACK_PACKAGE_CONTACT "pierre.aubert@lapp.in2p3.fr" CACHE STRING "Contact of the program")
set(CPACK_PACKAGE_ICON ${CMAKE_SOURCE_DIR}/doc/icon.bmp CACHE STRING "Icon of the program")
set(CPACK_PACKAGE_DESCRIPTION ${PROGRAM_DESCRIPTION_NO_QUOTE} CACHE STRING "Desription with quote of the program")
if(CREATE_DEB) #Ok for UBUNTU
set(CPACK_GENERATOR "DEB" CACHE STRING "Package type of the program")
set(CPACK_DEBIAN_PACKAGE_VERSION "${PROGRAM_VERSION}" CACHE STRING "Version of the program")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "pierre.aubert@lapp.in2p3.fr" CACHE STRING "Package maintainer of the program") #required
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE ${PROGRAM_HOMEPAGE} CACHE STRING "Homepage of the program") #For the debian installer only
set(CPACK_DEBIAN_PACKAGE_DEPENDS "" CACHE STRING "Depends of the program")
endif(CREATE_DEB)
if(CREATE_RPM) #Need to install rmp package on ubuntu which contains rpmbuild
set(CPACK_GENERATOR "RPM" CACHE STRING "Package type of the program")
set(CPACK_RPM_PACKAGE_AUTOREQ "NO" CACHE STRING "Caracteristics of the program")
set(CPACK_RPM_PACKAGE_REQUIRES "" CACHE STRING "Depends of the program")
set(LIBRARY_DIRECTORY "lib64" CACHE STRING "define the library directory (especially for Fedora with the wtf lib64)" FORCE)
endif(CREATE_RPM)
# if(CREATE_DMG) #We should use DragNDrop or PackageMaker of osx
# set(CPACK_GENERATOR "DMG")
# endif(CREATE_DMG)
include(CPack)
# Has to be used :
# cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCREATE_DEB=yes -DSSE4.2=yes # Or whatever extension
# make -j 8
# cpack
endif()
endfunction(createLinuxPackages)
# Create the target to create the documentation of the current project
# projectName : name of the project to be used
# doxyfileName : name of the Doxyfile cmake macro to be used to generate the documentation
function(phoenix_create_doc projectName doxyfileName)
find_path(doxygen_BINNARY_DIR
NAMES doxygen
PATHS "${PHOENIX_PREFIX}/bin" ${CMAKE_INSTALL_PREFIX}/bin ${CMAKE_INCLUDE_PATH}/bin /usr/bin /usr/local/bin /bin $ENV{HOME}/usr/bin
)
if(doxygen_BINNARY_DIR)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html)
message(STATUS "program doxygen found create doc target by project ${projectName}")
file(GLOB_RECURSE allDocFiles ${CMAKE_SOURCE_DIR}/*.cpp *.h *.dox)
string(REGEX REPLACE "${CMAKE_BINARY_DIR}[^;]+;?" "" allDocFiles "${allDocFiles}")
set(PROJECT_LOGO ${CMAKE_CURRENT_SOURCE_DIR}/logo.png)
set(OUTPUT_DOC_DIR ${CMAKE_CURRENT_BINARY_DIR}/)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${doxyfileName} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
set(targetName "phoenix_doc_${projectName}")
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/doc.txt
OUTPUT ${targetName}
COMMENT "doxygen documentation generation for project ${projectName}"
COMMAND doxygen ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
DEPENDS ${allDocFiles}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
add_custom_target(${targetName} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/doc.txt)
if(NOT TARGET doc)
add_custom_target(doc)
endif()
add_dependencies(doc ${targetName})
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION share/${projectName}/doc)
else()
message(STATUS "program doxygen not found for project ${projectName}")
endif()
endfunction(phoenix_create_doc)
set(FIND_PROJECT_TEMPLATE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/template_find_project.cmake" CACHE STRING "Name of the file which contains the template to generate FindProgram.cmake files")
set(FIND_HEADER_PROJECT_TEMPLATE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/template_find_header_project.cmake" CACHE STRING "Name of the file which contains the template to generate FindProgram.cmake files but only with header")
# Create the target to create the find cmake file
# projectName : name of the project to be used
# libraryTargetName : name of the library to be searched
# headerFile : header to be searched
# extraIncludeFile : extra include file to be used
function(phoenix_create_find projectName libraryTargetName headerFile extraIncludeFile)
set(findFileName "Find${projectName}.cmake")
string(TOUPPER ${projectName} PROJECT_NAME_UPPER)
set(fullDependModule "")
set(EXTRA_DEPENDENCIES_LIB "")
foreach(dependencyModule ${ARGN})
string(APPEND fullDependModule "find_package(${dependencyModule} REQUIRED)\n")
string(TOUPPER ${dependencyModule} DEPENDENCY_MODULE_UPPER)
string(APPEND EXTRA_DEPENDENCIES_LIB " \${${DEPENDENCY_MODULE_UPPER}}")
endforeach(dependencyModule)
set(PHOENIX_PACKAGE_PEDENDENCIES "${fullDependModule}")
if(extraIncludeFile STREQUAL "")
set(EXTRA_INCLUDE_CMAKE "")
else()
set(EXTRA_INCLUDE_CMAKE "include(${CMAKE_MODULE_PATH}/${extraIncludeFile})")
endif()
configure_file(${FIND_PROJECT_TEMPLATE_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${findFileName} @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${findFileName} DESTINATION share/cmake)
endfunction(phoenix_create_find)
# Create the target to create the find cmake file
# projectName : name of the project to be used
# libraryTargetName : name of the library to be searched
# headerFile : header to be searched
# extraIncludeFile : extra include file to be used
function(phoenix_create_find_header projectName headerFile extraIncludeFile)
set(findFileName "Find${projectName}.cmake")
string(TOUPPER ${projectName} PROJECT_NAME_UPPER)
set(fullDependModule "")
set(EXTRA_DEPENDENCIES_LIB "")
foreach(dependencyModule ${ARGN})
string(APPEND fullDependModule "find_package(${dependencyModule} REQUIRED)\n")
string(TOUPPER ${dependencyModule} DEPENDENCY_MODULE_UPPER)
string(APPEND EXTRA_DEPENDENCIES_LIB " \${${DEPENDENCY_MODULE_UPPER}}")
endforeach(dependencyModule)
set(PHOENIX_PACKAGE_PEDENDENCIES "${fullDependModule}")
if(extraIncludeFile STREQUAL "")
set(EXTRA_INCLUDE_CMAKE "")
else()
set(EXTRA_INCLUDE_CMAKE "include(${CMAKE_MODULE_PATH}/${extraIncludeFile})")
endif()
configure_file(${FIND_HEADER_PROJECT_TEMPLATE_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${findFileName} @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${findFileName} DESTINATION share/cmake)
endfunction(phoenix_create_find_header)
# Define the base of a Phoenix project
# programName : name of the program/library
# programVersion : version of the program/library
# programDescritpion : description of the program/library
# programHomePage : home page of the program/library
function(phoenix_base_project programName programVersion programDescritpion programHomePage)
if(NOT MODULE_MODE)
set(PROGRAM_NAME "${programName}" CACHE STRING "name of the current project" FORCE)
set(PROGRAM_VERSION "${programVersion}" CACHE STRING "version of the current project" FORCE)
set(PROGRAM_DESCRIPTION_NO_QUOTE "${programDescritpion}" CACHE STRING "description of the current project" FORCE)
set(PROGRAM_DESCRIPTION "\"${PROGRAM_DESCRIPTION_NO_QUOTE}\"" CACHE STRING "description with double quotes of the current project" FORCE)
set(PROGRAM_HOMEPAGE "${programHomePage}" CACHE STRING "home page of the current project" FORCE)
set(LIBRARY_DIRECTORY "lib" CACHE STRING "define the library directory (especially for Fedora with the wtf lib64)" FORCE)
set(DOC_MODE no CACHE BOOL "Doc mode")
set(SELF_TESTS_MODE yes CACHE BOOL "Self test mode")
message(STATUS "SELF_TESTS_MODE = ${SELF_TESTS_MODE}")
set(PHOENIX_INSTALL_PREFIX "$ENV{HOME}/usr" CACHE STRING "Install prefix")
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${PHOENIX_INSTALL_PREFIX}" CACHE PATH "cmake install prefix" FORCE)
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/cmake CACHE STRING "cmake module path")
set(PHOENIX_FORCE_PULL_MODULE no CACHE BOOL "Say if the submodule have to be pulled every time or not")
if(CMAKE_BUILD_TYPE STREQUAL "Coverage")
message(STATUS "Build for tests COVERAGE")
set(CTEST_COVERAGE_COMMAND "gcov")
set(SELF_TESTS_MODE yes)
set(CMAKE_CXX_FLAGS "--std=c++20 -Wall -Werror -g -O0 -fprofile-arcs -ftest-coverage" PARENT_SCOPE)
else()
set(CMAKE_CXX_FLAGS "--std=c++20 -Wall -Werror -g -O2" PARENT_SCOPE)
endif()
add_definitions(-D__PROGRAM_VERSION__="${PROGRAM_VERSION}")
if(DOC_MODE)
add_subdirectory(doc)
endif()
createLinuxPackages()
endif()
endfunction(phoenix_base_project)
set(SCRIPT_CLONE_MODULE "${CMAKE_CURRENT_SOURCE_DIR}/scriptCloneModule.sh" CACHE STRING "Script to be used to clone project used as module")
set(SCRIPT_PULL_MODULE "${CMAKE_CURRENT_SOURCE_DIR}/scriptPull.sh" CACHE STRING "Script to be used to clone project used as module")
set(SCRIPT_CLONE_PACKAGE "${CMAKE_CURRENT_SOURCE_DIR}/scriptClonePackage.sh" CACHE STRING "Script to be used to clone package used as module")
# Check if a project (used as module) is found, if it's not, it will be fetch with its url
# When the project is found, this function does a classic add_subdirectory
# Parameter :
# packageName : name of the package to be found (classic parameter of find_package)
# urlGitToPackage : url of the git repository to be used to fetch it if it is not found
function(get_extra_module packageName urlGitToPackage)
set(PHOENIX_TARGET_NAME "phoenix_${packageName}_found")
if(TARGET ${PHOENIX_TARGET_NAME})
message(STATUS "Project ${packageName} already found, target ${PHOENIX_TARGET_NAME} exits")
else()
add_custom_target(${PHOENIX_TARGET_NAME})
set(SUB_MODULE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/.tmp_project)
file(MAKE_DIRECTORY ${SUB_MODULE_DIRECTORY})
set(MODULE_MODE yes)
set(MODULE_PROJECT_DIR ${SUB_MODULE_DIRECTORY}/${packageName})
if(EXISTS ${MODULE_PROJECT_DIR})
message(STATUS "Find project ${packageName} in ${MODULE_PROJECT_DIR}")
execute_process(COMMAND ${SCRIPT_PULL_MODULE} ${MODULE_PROJECT_DIR}
WORKING_DIRECTORY ${SUB_MODULE_DIRECTORY}/
ERROR_QUIET
OUTPUT_QUIET
)
add_subdirectory(${MODULE_PROJECT_DIR})
include_directories(${MODULE_PROJECT_DIR}/src)
include_directories(${PHOENIX_INCLUDE_DIRS})
else()
message(STATUS "Project ${packageName} not found")
if(urlGitToPackage)
get_filename_component(basePackageDirName ${urlGitToPackage} NAME_WE)
message(STATUS "Get project ${packageName} with url '${urlGitToPackage}'")
execute_process(COMMAND ${SCRIPT_CLONE_MODULE} ${urlGitToPackage}
WORKING_DIRECTORY ${SUB_MODULE_DIRECTORY}/)
if(EXISTS ${MODULE_PROJECT_DIR})
message(STATUS "Find project ${packageName} in ${MODULE_PROJECT_DIR}")
add_subdirectory(${MODULE_PROJECT_DIR})
include_directories(${MODULE_PROJECT_DIR}/src)
include_directories(${PHOENIX_INCLUDE_DIRS})
else()
message(FATAL_ERROR "Project ${packageName} not found even after cloning repository ${urlGitToPackage}")
endif()
else(urlGitToPackage)
message(FATAL_ERROR "Package ${packageName} not found and no url to fetch it")
endif(urlGitToPackage)
endif()
endif()
endfunction(get_extra_module)
# Check if a project (used as module) is found, if it's not, it will be fetch with its url
# When the project is found, this function does a classic add_subdirectory
# Parameter :
# packageName : name of the package to be found (classic parameter of find_package)
# urlGitToPackage : url of the git repository to be used to fetch it if it is not found
function(pull_extra_module packageName urlGitToPackage)
# There is one global varialbe PHOENIX_FORCE_PULL_MODULE
# - if the PHOENIX_FORCE_PULL_MODULE == no
# - we look for the FindXXX.cmake and we use the classic find_package
# - if the package has been found nothing to do
# - but if the corresponding module is found, we remove it (to avoid extra clone and conflict)
# - if the package is not found, we get the existing module (by clone or pull)
# - if the module does not exsit, it is cloned (and then potentially installed)
# - if the module does exsit, it is pulled (and also potentially installed after)
# - if the PHOENIX_FORCE_PULL_MODULE == yes
# - if the module is not found, we clone it even if the package does exist (we recompile it and reinstall it)
# - if the module is found, we pull it even if the package does exist (we recompile it and reinstall it)
if(PHOENIX_FORCE_PULL_MODULE)
# We always pull the module
get_extra_module(${packageName} ${urlGitToPackage})
else()
# Try to find the package
find_package(${packageName})
string(TOUPPER ${packageName} UPPER_PACKAGE_NAME)
if(${${UPPER_PACKAGE_NAME}_FOUND})
# The package is found, we check if the module exist
set(MODULE_PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/.tmp_project/${packageName})
if(EXISTS ${MODULE_PROJECT_DIR})
message(STATUS "Remove module ${packageName} in ${MODULE_PROJECT_DIR}")
file(REMOVE_RECURSE ${MODULE_PROJECT_DIR})
endif()
else()
# The module is not found, so we get it
message(STATUS "${packageName} not found")
get_extra_module(${packageName} ${urlGitToPackage})
endif()
endif()
endfunction(pull_extra_module)
# Do a classic find_package but if the package is not found, it will be fetch with its url
# Parameter :
# packageName : name of the package to be found (classic parameter of find_package)
# urlGitToPackage : url of the git repository to be used to fetch it if it is not found
function(phoenix_find_package packageName urlGitToPackage)
find_package(${packageName})
string(TOUPPER ${packageName} UPPER_PACKAGE_NAME)
message(STATUS "FIND variable ${packageName}_FOUND = ${${UPPER_PACKAGE_NAME}_FOUND}")
if(NOT ${${UPPER_PACKAGE_NAME}_FOUND})
message(STATUS "${packageName} not found")
if(urlGitToPackage)
get_filename_component(basePackageDirName ${urlGitToPackage} NAME_WE)
message(STATUS "The url '${urlGitToPackage}' gives basePackageDirName = ${basePackageDirName}")
execute_process(COMMAND ${SCRIPT_CLONE_PACKAGE} ${basePackageDirName} ${urlGitToPackage} ${CMAKE_INSTALL_PREFIX}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
message(STATUS "End of ${basePackageDirName} installation")
find_package(${packageName})
else(urlGitToPackage)
message(FATAL_ERROR "Package ${packageName} not found and no url to fetch it")
endif(urlGitToPackage)
endif()
endfunction(phoenix_find_package)
if(APPLE)
set(CMAKE_MACOSX_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
# use, i.e. don't skip the full RPATH for the build tree
set(CMAKE_SKIP_BUILD_RPATH FALSE)
# when building, don't use the install RPATH already
# (but later on when installing)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
endif()
if(CREATE_RPM)
set(LIBRARY_DIRECTORY "lib64")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib" "${CMAKE_INSTALL_PREFIX}/lib64")
endif()
message(STATUS "LIBRARY_DIRECTORY = '${LIBRARY_DIRECTORY}'")
if(CREATE_RPM OR CREATE_DEB)
set(PACKAGE_CREATION_MODE yes CACHE BOOL "Say if we are in the package creation mode or not at the install")
# message(STATUS "Now install cmake modules in '${CMAKE_MODULE_PATH}'")
# set(PLIBS_INSTALL_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} CACHE STRING "Install path of the cmake module when creating binary package")
endif()
#!/bin/bash
urlGitToPackage="$1"
git clone $urlGitToPackage
#!/bin/bash
basePackageDirName="$1"
urlGitToPackage="$2"
CMAKE_INSTALL_PREFIX="$3"
git clone $urlGitToPackage
cd $basePackageDirName
mkdir -p build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}"
make -j `nproc`
make install -j `nproc`
#!/bin/bash
packageDir="$1"
cd "$packageDir"
git pull
##########################################################################
# #
# test de présence des headers de la @PROJECT_NAME_UPPER@ #
# #
##########################################################################
@PHOENIX_PACKAGE_PEDENDENCIES@
find_path(@PROJECT_NAME_UPPER@_INCLUDE_DIR
NAMES @headerFile@
PATHS "${@PROJECT_NAME_UPPER@_PREFIX}/include/@projectName@" ${CMAKE_INSTALL_PREFIX}/include/@projectName@
$ENV{HOME}/usr/include/@projectName@ ${CMAKE_INCLUDE_PATH}/@projectName@ /usr/include/@projectName@ /usr/local/include/@projectName@
)
if(@PROJECT_NAME_UPPER@_INCLUDE_DIR)
message(STATUS "Found @PROJECT_NAME_UPPER@ headers : ${@PROJECT_NAME_UPPER@_INCLUDE_DIR}")
else(@PROJECT_NAME_UPPER@_INCLUDE_DIR)
message(FATAL_ERROR "@PROJECT_NAME_UPPER@ headers not found")
endif(@PROJECT_NAME_UPPER@_INCLUDE_DIR)
include_directories(${@PROJECT_NAME_UPPER@_INCLUDE_DIR})
set(@PROJECT_NAME_UPPER@_PREFIX "${@PROJECT_NAME_UPPER@_INCLUDE_DIR}/..")
set(@PROJECT_NAME_UPPER@ @libraryTargetName@ @EXTRA_DEPENDENCIES_LIB@)
set(@PROJECT_NAME_UPPER@_FOUND "YES" CACHE BOOL "@PROJECT_NAME_UPPER@ program found")
include_directories(${@PROJECT_NAME_UPPER@_INCLUDE_DIR} ${@PROJECT_NAME_UPPER@_INCLUDE_DIR}/../)
@EXTRA_INCLUDE_CMAKE@
##########################################################################
# #
# test de présence des headers de la @PROJECT_NAME_UPPER@ #
# #
##########################################################################
@PHOENIX_PACKAGE_PEDENDENCIES@
find_path(@PROJECT_NAME_UPPER@_INCLUDE_DIR
NAMES @headerFile@
PATHS "${@PROJECT_NAME_UPPER@_PREFIX}/include/@projectName@" ${CMAKE_INSTALL_PREFIX}/include/@projectName@
$ENV{HOME}/usr/include/@projectName@ ${CMAKE_INCLUDE_PATH}/@projectName@ /usr/include/@projectName@ /usr/local/include/@projectName@
)
if(@PROJECT_NAME_UPPER@_INCLUDE_DIR)
message(STATUS "Found @PROJECT_NAME_UPPER@ headers : ${@PROJECT_NAME_UPPER@_INCLUDE_DIR}")
else(@PROJECT_NAME_UPPER@_INCLUDE_DIR)
message(FATAL_ERROR "@PROJECT_NAME_UPPER@ headers not found")
endif(@PROJECT_NAME_UPPER@_INCLUDE_DIR)
include_directories(${@PROJECT_NAME_UPPER@_INCLUDE_DIR})
##########################################################################
# #
# test de présence de la @PROJECT_NAME_UPPER@ #
# #
##########################################################################
set(LIBRARY_NAME "lib@libraryTargetName@.so")
if(APPLE)
set(LIBRARY_NAME "lib@libraryTargetName@.dylib")
endif()
find_path(@PROJECT_NAME_UPPER@_LIBRARY_DIR
NAMES ${LIBRARY_NAME}
PATHS "${@PROJECT_NAME_UPPER@_PREFIX}/lib" ${CMAKE_INSTALL_PREFIX}/lib $ENV{HOME}/usr/lib ${CMAKE_INCLUDE_PATH}/lib /usr/lib /usr/local/lib /lib
)
if(@PROJECT_NAME_UPPER@_LIBRARY_DIR)
message(STATUS "Found lib @PROJECT_NAME_UPPER@ : ${@PROJECT_NAME_UPPER@_LIBRARY_DIR}")
else(@PROJECT_NAME_UPPER@_LIBRARY_DIR)
message(FATAL_ERROR "lib @PROJECT_NAME_UPPER@ not found")
endif(@PROJECT_NAME_UPPER@_LIBRARY_DIR)
set(@PROJECT_NAME_UPPER@_PREFIX "${@PROJECT_NAME_UPPER@_LIBRARY_DIR}/..")
set(@PROJECT_NAME_UPPER@ @libraryTargetName@ @EXTRA_DEPENDENCIES_LIB@)
set(@PROJECT_NAME_UPPER@_FOUND "YES" CACHE BOOL "@PROJECT_NAME_UPPER@ program found")
link_directories(${@PROJECT_NAME_UPPER@_LIBRARY_DIR})
include_directories(${@PROJECT_NAME_UPPER@_INCLUDE_DIR} ${@PROJECT_NAME_UPPER@_INCLUDE_DIR}/../)
@EXTRA_INCLUDE_CMAKE@
project(Phoenix)
cmake_minimum_required(VERSION 2.8)
phoenix_create_doc(PhoenixPerformance Doxyfile.cmake)
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment