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 919 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
  7. IMPORTED_LOCATION ${cpuinfo_LIBRARIES}
  8. INTERFACE_INCLUDE_DIRECTORIES ${cpuinfo_INCLUDE_DIRS}
  9. )
  10. return()
  11. endif()
  12. SET(CPUINFO_LIBRARY_TYPE "static" 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 ${CMAKE_CURRENT_BINARY_DIR}/cpuinfo EXCLUDE_FROM_ALL)