diff --git a/cmake/FindPROJECT_NAME.cmake.in.in b/cmake/FindPROJECT_NAME.cmake.in.in index 0b67598c3ae7f69e88a61ce6581cce3649a2119e..b614b0fe18937e5ddfeda5a146c4d73f96db06a0 100644 --- a/cmake/FindPROJECT_NAME.cmake.in.in +++ b/cmake/FindPROJECT_NAME.cmake.in.in @@ -1,3 +1,4 @@ +####################################################################################################################### # # cmake module for finding @PROJECT_NAME@ # @@ -12,6 +13,19 @@ # # @author Martin Killenberg, DESY # +####################################################################################################################### + +####################################################################################################################### +# +# IMPORTANT NOTE: +# +# DO NOT MODIFY THIS FILE inside a project. Instead update the project-template repository and pull the change from +# there. Make sure to keep the file generic, since it will be used by other projects, too. +# +# If you have modified this file inside a project despite this warning, make sure to cherry-pick all your changes +# into the project-template repository immediately. +# +####################################################################################################################### # The library itself must be "searched" using the FIND_LIBRARY command in the known install directory, to set # the variable properly diff --git a/cmake/Makefile.coverage.in b/cmake/Makefile.coverage.in index 79b08d35f27af03463b386fdaf927c43bc003fab..afda6673ea33d67d61db7ca72e3166b3479418eb 100644 --- a/cmake/Makefile.coverage.in +++ b/cmake/Makefile.coverage.in @@ -1,3 +1,21 @@ +####################################################################################################################### +# +# Additional make target for generating a code coverage report. +# +####################################################################################################################### + +####################################################################################################################### +# +# IMPORTANT NOTE: +# +# DO NOT MODIFY THIS FILE inside a project. Instead update the project-template repository and pull the change from +# there. Make sure to keep the file generic, since it will be used by other projects, too. +# +# If you have modified this file inside a project despite this warning, make sure to cherry-pick all your changes +# into the project-template repository immediately. +# +####################################################################################################################### + coverage: rm -f `find . -name "*\.gcda"` make test diff --git a/cmake/Modules/FindDOOCS.cmake b/cmake/Modules/FindDOOCS.cmake index f346382402de8f520c596877a566c8506f6a08fd..3694694c89473ffd5179b0186cc728241d3d331a 100644 --- a/cmake/Modules/FindDOOCS.cmake +++ b/cmake/Modules/FindDOOCS.cmake @@ -1,3 +1,4 @@ +####################################################################################################################### # # cmake module for finding DOOCS # @@ -15,6 +16,19 @@ # # @author Martin Hierholzer, DESY # +####################################################################################################################### + +####################################################################################################################### +# +# IMPORTANT NOTE: +# +# DO NOT MODIFY THIS FILE inside a project. Instead update the project-template repository and pull the change from +# there. Make sure to keep the file generic, since it will be used by other projects, too. +# +# If you have modified this file inside a project despite this warning, make sure to cherry-pick all your changes +# into the project-template repository immediately. +# +####################################################################################################################### SET(DOOCS_FOUND 0) diff --git a/cmake/PROJECT_NAME-config.in.in b/cmake/PROJECT_NAME-config.in.in index 459561e7168dfc0e6ff5f8c6f883269a0067ed56..e3feb03b4a9367c162d8fdaff0c67aed0e2c48f0 100755 --- a/cmake/PROJECT_NAME-config.in.in +++ b/cmake/PROJECT_NAME-config.in.in @@ -1,4 +1,21 @@ #!/bin/sh +####################################################################################################################### +# +# Shell script to output compiler and linker flags for use in plain Makefiles or at command line. +# +####################################################################################################################### + +####################################################################################################################### +# +# IMPORTANT NOTE: +# +# DO NOT MODIFY THIS FILE inside a project. Instead update the project-template repository and pull the change from +# there. Make sure to keep the file generic, since it will be used by other projects, too. +# +# If you have modified this file inside a project despite this warning, make sure to cherry-pick all your changes +# into the project-template repository immediately. +# +####################################################################################################################### print_usage(){ echo -n "usage: $0 [--version] [--cppflags] [--ldflags]" 1>&2 @@ -14,9 +31,9 @@ if [ $# -eq 0 ]; then exit 1 fi -#The variables are all prepared in CMAKE and also provided by -#Find@PROJECT_NAME@.cmake, so dependent applications can create consistent -#Makefiles. +# The variables are all prepared in CMAKE and also provided by +# Find@PROJECT_NAME@.cmake, so dependent applications can create consistent +# Makefiles. while [ $# -gt 0 ]; do case "$1" in --cppflags) diff --git a/cmake/create_cmake_config_files.cmake b/cmake/create_cmake_config_files.cmake index ab4176b165ae9ec6ce281209cae42b83e52c4b05..72135c6aeb04ec40dd1666bd0bf32eb89e656949 100644 --- a/cmake/create_cmake_config_files.cmake +++ b/cmake/create_cmake_config_files.cmake @@ -15,6 +15,18 @@ # ####################################################################################################################### +####################################################################################################################### +# +# IMPORTANT NOTE: +# +# DO NOT MODIFY THIS FILE inside a project. Instead update the project-template repository and pull the change from +# there. Make sure to keep the file generic, since it will be used by other projects, too. +# +# If you have modified this file inside a project despite this warning, make sure to cherry-pick all your changes +# into the project-template repository immediately. +# +####################################################################################################################### + # create variables for standard makefiles set(${PROJECT_NAME}_CXX_FLAGS_MAKEFILE "${${PROJECT_NAME}_CXX_FLAGS}") @@ -32,7 +44,11 @@ endforeach() string(REPLACE " " ";" LIST ${${PROJECT_NAME}_LIBRARIES}) foreach(LIBRARY ${LIST}) - set(${PROJECT_NAME}_LINKER_FLAGS_MAKEFILE "${${PROJECT_NAME}_LINKER_FLAGS_MAKEFILE} -l${LIBRARY}") + if(LIBRARY MATCHES "/") # library name contains slashes: link against the a file path name + set(${PROJECT_NAME}_LINKER_FLAGS_MAKEFILE "${${PROJECT_NAME}_LINKER_FLAGS_MAKEFILE} ${LIBRARY}") + else() # library name does not contain slashes: link against library with -l option + set(${PROJECT_NAME}_LINKER_FLAGS_MAKEFILE "${${PROJECT_NAME}_LINKER_FLAGS_MAKEFILE} -l${LIBRARY}") + endif() endforeach() # we have nested @-statements, so we have to parse twice: