-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix pkg config detection and code cleanup (#224)
* Fix libpmem detection in case of pkg_config is missing * Remove SLAB_HASH macro - all occurrences was replaced by HASH_POWER macro in b12de66
- Loading branch information
1 parent
3f984c5
commit 8b23de5
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Find the libpmem library. | ||
# Output variables: | ||
# LIBPMEM_INCLUDE_DIRS : e.g., /usr/include/. | ||
# LIBPMEM_LIBRARIES : Library path of libpmem | ||
# LIBPMEM_FOUND : True if found. | ||
|
||
##_____________________________________________________________________________ | ||
## Check for the header files | ||
|
||
find_path (LIBPMEM_INCLUDE_DIRS | ||
NAMES libpmem.h | ||
PATH_SUFFIXES include | ||
) | ||
|
||
##_____________________________________________________________________________ | ||
## Check for the library | ||
|
||
find_library (LIBPMEM_LIBRARIES pmem | ||
PATH_SUFFIXES lib64 lib | ||
) | ||
|
||
##_____________________________________________________________________________ | ||
## Actions taken when all components have been found | ||
|
||
find_package_handle_standard_args (LIBPMEM DEFAULT_MSG LIBPMEM_LIBRARIES LIBPMEM_INCLUDE_DIRS) | ||
|
||
if (LIBPMEM_FOUND) | ||
message (STATUS "Found components for LIBPMEM") | ||
message (STATUS "LIBPMEM_INCLUDE_DIRS = ${LIBPMEM_INCLUDE_DIRS}") | ||
message (STATUS "LIBPMEM_LIBRARIES = ${LIBPMEM_LIBRARIES}") | ||
else () | ||
message(FATAL_ERROR "Could not find LIBPMEM, download and install from https://github.com/pmem/pmdk/releases") | ||
endif () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters