Skip to content

Commit

Permalink
put cmake cpuinfo vars into cmake cache
Browse files Browse the repository at this point in the history
Summary:
Put two CMAKE vars related with cpuinfo into CMAKE CACHE so that their values can be defined from command line.
CPUINFO_LIBRARY_TYPE
CPUINFO_RUNTIME_TYPE

Reviewed By: jianyuh

Differential Revision: D19665130

fbshipit-source-id: dda96da0f6b39038fa3f610e14d03e6d8b769c3a
  • Loading branch information
Hongzhang Shan authored and facebook-github-bot committed Jan 31, 2020
1 parent 03f4ec2 commit cb4834f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ if(NOT TARGET cpuinfo)
set(CPUINFO_BUILD_UNIT_TESTS OFF CACHE BOOL "Do not build cpuinfo unit tests")
set(CPUINFO_BUILD_MOCK_TESTS OFF CACHE BOOL "Do not build cpuinfo mock tests")
set(CPUINFO_BUILD_BENCHMARKS OFF CACHE BOOL "Do not build cpuinfo benchmarks")
set(CPUINFO_LIBRARY_TYPE static)
set(CPUINFO_LIBRARY_TYPE static CACHE string "Set lib type to static")
#Select static runtime, needed for static build for MSVC
set(CPUINFO_RUNTIME_TYPE static)
set(CPUINFO_RUNTIME_TYPE static CACHE string "Set runtime to static")
add_subdirectory("${CPUINFO_SOURCE_DIR}" "${FBGEMM_BINARY_DIR}/cpuinfo")
set_property(TARGET cpuinfo PROPERTY POSITION_INDEPENDENT_CODE ON)
endif()
Expand Down

0 comments on commit cb4834f

Please sign in to comment.