You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

cpuinfo.cmake 929 B

1234567891011121314151617181920
  1. if(MGE_USE_SYSTEM_LIB)
  2. find_package(Cpuinfo)
  3. message(STATUS "Using system provided cpuinfo ${cpuinfo_VERSION}")
  4. add_library(libcpuinfo IMPORTED GLOBAL)
  5. set_target_properties(
  6. libcpuinfo PROPERTIES IMPORTED_LOCATION ${cpuinfo_LIBRARIES}
  7. INTERFACE_INCLUDE_DIRECTORIES ${cpuinfo_INCLUDE_DIRS})
  8. return()
  9. endif()
  10. set(CPUINFO_LIBRARY_TYPE
  11. "static"
  12. CACHE STRING "Type of cpuinfo library (shared, static, or default) to build")
  13. option(CPUINFO_BUILD_TOOLS "Build command-line tools" OFF)
  14. option(CPUINFO_BUILD_UNIT_TESTS "Build cpuinfo unit tests" OFF)
  15. option(CPUINFO_BUILD_MOCK_TESTS "Build cpuinfo mock tests" OFF)
  16. option(CPUINFO_BUILD_BENCHMARKS "Build cpuinfo micro-benchmarks" OFF)
  17. include_directories("${PROJECT_SOURCE_DIR}/third_party/cpuinfo/include")
  18. add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/cpuinfo
  19. ${CMAKE_CURRENT_BINARY_DIR}/cpuinfo EXCLUDE_FROM_ALL)