Skip to content
Snippets Groups Projects
Commit dfad71aa authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

Merge remote-tracking branch 'project-template/master'

parents 460377ef 1f18ae64
No related branches found
No related tags found
No related merge requests found
#######################################################################################################################
# #
# cmake module for finding @PROJECT_NAME@ # cmake module for finding @PROJECT_NAME@
# #
...@@ -12,6 +13,19 @@ ...@@ -12,6 +13,19 @@
# #
# @author Martin Killenberg, DESY # @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 library itself must be "searched" using the FIND_LIBRARY command in the known install directory, to set
# the variable properly # the variable properly
......
#######################################################################################################################
#
# 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: coverage:
rm -f `find . -name "*\.gcda"` rm -f `find . -name "*\.gcda"`
make test make test
......
#######################################################################################################################
# #
# cmake module for finding DOOCS # cmake module for finding DOOCS
# #
...@@ -15,6 +16,19 @@ ...@@ -15,6 +16,19 @@
# #
# @author Martin Hierholzer, DESY # @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) SET(DOOCS_FOUND 0)
......
#!/bin/sh #!/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(){ print_usage(){
echo -n "usage: $0 [--version] [--cppflags] [--ldflags]" 1>&2 echo -n "usage: $0 [--version] [--cppflags] [--ldflags]" 1>&2
...@@ -14,9 +31,9 @@ if [ $# -eq 0 ]; then ...@@ -14,9 +31,9 @@ if [ $# -eq 0 ]; then
exit 1 exit 1
fi fi
#The variables are all prepared in CMAKE and also provided by # The variables are all prepared in CMAKE and also provided by
#Find@PROJECT_NAME@.cmake, so dependent applications can create consistent # Find@PROJECT_NAME@.cmake, so dependent applications can create consistent
#Makefiles. # Makefiles.
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
case "$1" in case "$1" in
--cppflags) --cppflags)
......
...@@ -15,6 +15,18 @@ ...@@ -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 # create variables for standard makefiles
set(${PROJECT_NAME}_CXX_FLAGS_MAKEFILE "${${PROJECT_NAME}_CXX_FLAGS}") set(${PROJECT_NAME}_CXX_FLAGS_MAKEFILE "${${PROJECT_NAME}_CXX_FLAGS}")
...@@ -32,7 +44,11 @@ endforeach() ...@@ -32,7 +44,11 @@ endforeach()
string(REPLACE " " ";" LIST ${${PROJECT_NAME}_LIBRARIES}) string(REPLACE " " ";" LIST ${${PROJECT_NAME}_LIBRARIES})
foreach(LIBRARY ${LIST}) 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() endforeach()
# we have nested @-statements, so we have to parse twice: # we have nested @-statements, so we have to parse twice:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment