diff --git a/cmake/FindHWLOC.cmake b/cmake/FindHWLOC.cmake index 55309d3e..a3ca9984 100644 --- a/cmake/FindHWLOC.cmake +++ b/cmake/FindHWLOC.cmake @@ -23,3 +23,10 @@ set(HWLOC_INCLUDE_DIRS ${HWLOC_INCLUDE_DIR}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(HWLOC DEFAULT_MSG HWLOC_LIBRARY HWLOC_INCLUDE_DIR) + +include(CheckCSourceCompiles) +check_c_source_compiles( "#include \nint main(void) {hwloc_obj_t o; o->type = HWLOC_OBJ_L3CACHE; return 0;}" HAVE_HWLOC_OBJ_L3CACHE) +if (NOT HAVE_HWLOC_OBJ_L3CACHE) + message(STATUS "HWLOC is too old (v2 minimum), some algorithms will not be built, may cause other problems") + set(WITH_GHOSTRIDER OFF CACHE BOOL "Enable GhostRider algorithm" FORCE) +endif() diff --git a/cmake/ghostrider.cmake b/cmake/ghostrider.cmake index 3bc935b1..9a5b1745 100644 --- a/cmake/ghostrider.cmake +++ b/cmake/ghostrider.cmake @@ -3,6 +3,7 @@ if (WITH_GHOSTRIDER) add_subdirectory(src/crypto/ghostrider) set(GHOSTRIDER_LIBRARY ghostrider) else() + message(STATUS "WITH_GHOSTRIDER=OFF ... GhostRider algorithm disabled") remove_definitions(/DXMRIG_ALGO_GHOSTRIDER) set(GHOSTRIDER_LIBRARY "") endif()