UseCpuid.cmake 422 B

123456789101112
  1. function(eth_apply TARGET REQUIRED)
  2. find_package (Cpuid QUIET)
  3. eth_show_dependency(CPUID Cpuid)
  4. if (CPUID_FOUND)
  5. target_include_directories(${TARGET} SYSTEM PUBLIC ${CPUID_INCLUDE_DIRS})
  6. target_link_libraries(${TARGET} ${CPUID_LIBRARIES})
  7. target_compile_definitions(${TARGET} PUBLIC ETH_CPUID)
  8. elseif (NOT ${REQUIRED} STREQUAL "OPTIONAL")
  9. message(FATAL_ERROR "CPUID library not found")
  10. endif()
  11. endfunction()