Skip to content

Commit 99e2705

Browse files
committed
Fix cmake to handle missing NUMA_FOUND variable
In the case libnuma is not found, NUMA_FOUND is (can be?) not defined instead of being set to 0.
1 parent 98c50a4 commit 99e2705

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,11 @@ if (ENABLE_MULTITHREADING)
269269
else()
270270
include(FindPkgConfig)
271271
pkg_search_module(NUMA numa IMPORTED_TARGET GLOBAL)
272-
compile_option(NUMA_AWARE ${NUMA_FOUND})
273272
if (${NUMA_FOUND})
273+
compile_option(NUMA_AWARE ${NUMA_FOUND})
274274
target_link_libraries(QuEST PRIVATE PkgConfig::NUMA)
275275
else()
276+
compile_option(NUMA_AWARE 0)
276277
message(WARNING "libnuma not found, QuEST will not be aware of numa locality")
277278
endif()
278279
endif()

0 commit comments

Comments
 (0)