File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -251,8 +251,20 @@ else()
251251
252252 set (LIBHWLOC_INCLUDE_DIRS
253253 ${hwloc_targ_SOURCE_DIR} /include ;${hwloc_targ_BINARY_DIR} /include )
254- set (LIBHWLOC_LIBRARY_DIRS
255- ${hwloc_targ_BINARY_DIR} /Release;${hwloc_targ_BINARY_DIR} /Debug)
254+ if (CMAKE_BUILD_TYPE STREQUAL "Release" )
255+ set (LIBHWLOC_LIBRARY_DIRS ${hwloc_targ_BINARY_DIR} /Release)
256+ set (LIBHWLOC_LIBRARIES ${hwloc_targ_BINARY_DIR} /Release/hwloc.lib)
257+ elseif (CMAKE_BUILD_TYPE STREQUAL "Debug" )
258+ set (LIBHWLOC_LIBRARY_DIRS ${hwloc_targ_BINARY_DIR} /Debug)
259+ set (LIBHWLOC_LIBRARIES ${hwloc_targ_BINARY_DIR} /Debug/hwloc.lib)
260+ else ()
261+ message (
262+ WARNING
263+ "CMAKE_BUILD_TYPE is not set - UMF will be linked with the Release version of the HWLOC library by default"
264+ )
265+ set (LIBHWLOC_LIBRARY_DIRS ${hwloc_targ_BINARY_DIR} /Release)
266+ set (LIBHWLOC_LIBRARIES ${hwloc_targ_BINARY_DIR} /Release/hwloc.lib)
267+ endif ()
256268 else ()
257269 include (FetchContent)
258270 message (
You can’t perform that action at this time.
0 commit comments