From 0d2292e1d428f10d0102005e4580f1cbb5803a27 Mon Sep 17 00:00:00 2001 From: Brett Date: Mon, 16 Jan 2023 14:09:27 -0500 Subject: [PATCH] Fix cmake when not using phmaps --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 95c6270..8ad7a66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,7 @@ endif() #include parallel hashmaps if the user decided to download the submodule. if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/libraries/parallel-hashmap/CMakeLists.txt) + set(USE_PHMAPS) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/libraries/parallel-hashmap/) endif() @@ -34,7 +35,9 @@ message("Current Source: ${CMAKE_CURRENT_SOURCE_DIR}") add_library(BLT ${STD_FILES} ${PROFILING_FILES}) target_include_directories(BLT PUBLIC include/) -target_link_libraries(BLT phmap) +if(${USE_PHMAPS}) + target_link_libraries(BLT phmap) +endif() message("BLT ${CMAKE_PROJECT_VERSION} Successfully included!") if(${BUILD_TESTS}) @@ -49,4 +52,4 @@ if(${BUILD_TESTS}) target_link_libraries(BLT_TESTS BLT) message("BLT tests included!") -endif() \ No newline at end of file +endif()