diff options
author | Manuel Bentele | 2020-11-23 08:16:20 +0100 |
---|---|---|
committer | Manuel Bentele | 2020-11-23 08:16:20 +0100 |
commit | ddbf6b45526864baa0d982fff934f1b02ab538e6 (patch) | |
tree | f4c2b4fd8acec596f390ce752ee47c7ab76f51f1 | |
parent | [BUILD] update search paths for 'libatomic' to support build on FreeBSD (diff) | |
download | dnbd3-ddbf6b45526864baa0d982fff934f1b02ab538e6.tar.gz dnbd3-ddbf6b45526864baa0d982fff934f1b02ab538e6.tar.xz dnbd3-ddbf6b45526864baa0d982fff934f1b02ab538e6.zip |
[BUILD] remove automatic search of includes for 'libatomic'
This patch removes the automatic search of includes for 'libatomic'
since the includes for this library are part of the C11 standard
shipped with each compiler.
-rw-r--r-- | cmake/FindLibatomic.cmake | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/cmake/FindLibatomic.cmake b/cmake/FindLibatomic.cmake index 4f7dea2..e1c4915 100644 --- a/cmake/FindLibatomic.cmake +++ b/cmake/FindLibatomic.cmake @@ -11,10 +11,6 @@ pkg_check_modules(PKG_Libatomic QUIET libatomic) set(Libatomic_COMPILE_OPTIONS ${PKG_Libatomic_CFLAGS_OTHER}) set(Libatomic_VERSION ${PKG_Libatomic_VERSION}) -find_path(Libatomic_INCLUDE_DIR - NAMES stdatomic.h - HINTS ${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES} - ${PKG_Libatomic_INCLUDE_DIRS}) find_library(Libatomic_LIBRARY NAMES atomic HINTS ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES} @@ -24,7 +20,6 @@ include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Libatomic FOUND_VAR Libatomic_FOUND REQUIRED_VARS Libatomic_LIBRARY - Libatomic_INCLUDE_DIR VERSION_VAR Libatomic_VERSION FAIL_MESSAGE "Library 'atomic' is not available! Please install this required library!") @@ -32,22 +27,19 @@ if(Libatomic_FOUND AND NOT TARGET Libatomic::Libatomic) add_library(Libatomic::Libatomic UNKNOWN IMPORTED) set_target_properties(Libatomic::Libatomic PROPERTIES IMPORTED_LOCATION "${Libatomic_LIBRARY}" - INTERFACE_COMPILE_OPTIONS "${Libatomic_COMPILE_OPTIONS}" - INTERFACE_INCLUDE_DIRECTORIES "${Libatomic_INCLUDE_DIR}") + INTERFACE_COMPILE_OPTIONS "${Libatomic_COMPILE_OPTIONS}") endif(Libatomic_FOUND AND NOT TARGET Libatomic::Libatomic) -mark_as_advanced(Libatomic_LIBRARY Libatomic_INCLUDE_DIR) +mark_as_advanced(Libatomic_LIBRARY) if(Libatomic_FOUND) set(Libatomic_LIBRARIES ${Libatomic_LIBRARY}) - set(Libatomic_INCLUDE_DIRS ${Libatomic_INCLUDE_DIR}) endif(Libatomic_FOUND) # print found information if(${CMAKE_VERSION} VERSION_GREATER "3.15.0") message(VERBOSE "Libatomic_FOUND: ${Libatomic_FOUND}") message(VERBOSE "Libatomic_VERSION: ${Libatomic_VERSION}") - message(VERBOSE "Libatomic_INCLUDE_DIRS: ${Libatomic_INCLUDE_DIRS}") message(VERBOSE "Libatomic_COMPILE_OPTIONS: ${Libatomic_COMPILE_OPTIONS}") message(VERBOSE "Libatomic_LIBRARIES: ${Libatomic_LIBRARIES}") endif(${CMAKE_VERSION} VERSION_GREATER "3.15.0") |