Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/FBGEMM.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaya S Khudia <dskhudia@fb.com>2019-05-13 21:24:34 +0300
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2019-05-13 21:31:47 +0300
commitb14f582ca614bb01b53e4c842c8d50e511454ade (patch)
tree0151bf346fb3cfa2708ad070ed295d7bc3fcfa11 /CMakeLists.txt
parentc21a93d62898df77c4cebbbfa0f885f03c08483c (diff)
Back out "[FBGEMM][PR] switch from cmake downloads to git submodules"
Summary: Original commit changeset: 9a33573ba34b Reviewed By: jianyuh Differential Revision: D15320950 fbshipit-source-id: f6501b57346cc5e82fa2198dcf6b60b26cd4f7c6
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt24
1 files changed, 20 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 036b824..494e261 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,8 +106,16 @@ target_compile_options(fbgemm_avx512 PRIVATE
if(NOT TARGET asmjit)
#Download asmjit from github if ASMJIT_SRC_DIR is not specified.
if(NOT DEFINED ASMJIT_SRC_DIR)
- set(ASMJIT_SRC_DIR "${CMAKE_SOURCE_DIR}/third_party/asmjit" CACHE STRING
- "asmjit source directory from submodules")
+ message(STATUS "Downloading asmjit to ${FBGEMM_THIRDPARTY_DIR}/asmjit
+ (define ASMJIT_SRC_DIR to avoid it)")
+ configure_file("${FBGEMM_SOURCE_DIR}/cmake/modules/DownloadASMJIT.cmake"
+ "${FBGEMM_BINARY_DIR}/asmjit-download/CMakeLists.txt")
+ execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
+ WORKING_DIRECTORY "${FBGEMM_BINARY_DIR}/asmjit-download")
+ execute_process(COMMAND "${CMAKE_COMMAND}" --build .
+ WORKING_DIRECTORY "${FBGEMM_BINARY_DIR}/asmjit-download")
+ set(ASMJIT_SRC_DIR "${FBGEMM_THIRDPARTY_DIR}/asmjit" CACHE STRING
+ "asmjit source directory")
endif()
#build asmjit
@@ -119,8 +127,16 @@ endif()
if(NOT TARGET cpuinfo)
#Download cpuinfo from github if CPUINFO_SOURCE_DIR is not specified.
if(NOT DEFINED CPUINFO_SOURCE_DIR)
- set(CPUINFO_SOURCE_DIR "${CMAKE_SOURCE_DIR}/third_party/cpuinfo" CACHE STRING
- "cpuinfo source directory from submodules")
+ message(STATUS "Downloading cpuinfo to ${FBGEMM_THIRDPARTY_DIR}/cpuinfo
+ (define CPUINFO_SOURCE_DIR to avoid it)")
+ configure_file("${FBGEMM_SOURCE_DIR}/cmake/modules/DownloadCPUINFO.cmake"
+ "${FBGEMM_BINARY_DIR}/cpuinfo-download/CMakeLists.txt")
+ execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
+ WORKING_DIRECTORY "${FBGEMM_BINARY_DIR}/cpuinfo-download")
+ execute_process(COMMAND "${CMAKE_COMMAND}" --build .
+ WORKING_DIRECTORY "${FBGEMM_BINARY_DIR}/cpuinfo-download")
+ set(CPUINFO_SOURCE_DIR "${FBGEMM_THIRDPARTY_DIR}/cpuinfo" CACHE STRING
+ "cpuinfo source directory")
endif()
#build cpuinfo