Commit f6b13464 authored by Automated MSK Jenkins User's avatar Automated MSK Jenkins User
Browse files

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

parents 6ee93d11 d12a894a
# This scripts finds gcc's built-in atomic shared library (libatomic.so).
# It is required to link against this library on gcc when using 16 byte atomics, even when running on x86_64/amd64.
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
FIND_LIBRARY(GCCLIBATOMIC_LIBRARY NAMES atomic atomic.so.1 libatomic.so.1
HINTS
$ENV{HOME}/local/lib64
$ENV{HOME}/local/lib
/usr/local/lib64
/usr/local/lib
/opt/local/lib64
/opt/local/lib
/usr/lib64
/usr/lib
/lib64
/lib
)
else ()
SET(GCCLIBATOMIC_LIBRARY "")
endif ()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GCCLIBATOMIC DEFAULT_MSG GCCLIBATOMIC_LIBRARY)
......@@ -41,7 +41,11 @@ FIND_LIBRARY(@PROJECT_NAME@_LIBRARY @PROJECT_NAME@
set(@PROJECT_NAME@_VERSION "@@PROJECT_NAME@_SOVERSION@")
set(@PROJECT_NAME@_INCLUDE_DIRS @@PROJECT_NAME@_INCLUDE_DIRS@)
set(@PROJECT_NAME@_LIBRARY_DIRS @@PROJECT_NAME@_LIBRARY_DIRS@)
set(@PROJECT_NAME@_LIBRARIES ${@PROJECT_NAME@_LIBRARY} @@PROJECT_NAME@_LIBRARIES@)
if(@@PROJECT_NAME@_HAS_LIBRARY@)
set(@PROJECT_NAME@_LIBRARIES ${@PROJECT_NAME@_LIBRARY} @@PROJECT_NAME@_LIBRARIES@)
else()
set(@PROJECT_NAME@_LIBRARIES @@PROJECT_NAME@_LIBRARIES@)
endif()
set(@PROJECT_NAME@_CXX_FLAGS "@@PROJECT_NAME@_CXX_FLAGS@")
set(@PROJECT_NAME@_LINKER_FLAGS "@@PROJECT_NAME@_LINKER_FLAGS@ @@PROJECT_NAME@_LINK_FLAGS@")
set(@PROJECT_NAME@_LINK_FLAGS "@@PROJECT_NAME@_LINKER_FLAGS@ @@PROJECT_NAME@_LINK_FLAGS@")
......
......@@ -61,6 +61,12 @@ foreach(DEPENDENCY ${${PROJECT_NAME}_PUBLIC_DEPENDENCIES})
string(APPEND ${PROJECT_NAME}_PUBLIC_DEPENDENCIES_L "find_package(${DEPENDENCY} REQUIRED)\n")
endforeach()
if(TARGET ${PROJECT_NAME})
set(${PROJECT_NAME}_HAS_LIBRARY 1)
else()
set(${PROJECT_NAME}_HAS_LIBRARY 0)
endif()
# we have nested @-statements, so we have to parse twice:
# create the cmake find_package configuration file
......
Supports Markdown
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