Merged PR 17525: cmake fix for GENERATE_MARIAN_INSTALL_TARGETS

cmake fix for GENERATE_MARIAN_INSTALL_TARGETS
This commit is contained in:
Young Jin Kim 2021-02-04 05:04:48 +00:00 committed by Martin Junczys-Dowmunt
parent e407d49bda
commit b2d2a5d457
2 changed files with 11 additions and 5 deletions

View File

@ -438,8 +438,10 @@ endif(USE_MPI)
###############################################################################
# Find BLAS library
if(COMPILE_CPU)
set(EXT_LIBS ${EXT_LIBS} intgemm) # Enable intgemm when compiling CPU
add_definitions(-DCOMPILE_CPU=1)
if(NOT GENERATE_MARIAN_INSTALL_TARGETS)
set(EXT_LIBS ${EXT_LIBS} intgemm) # Enable intgemm when compiling CPU
add_definitions(-DCOMPILE_CPU=1)
endif()
if(USE_APPLE_ACCELERATE)
if(NOT APPLE)
message(FATAL_ERROR "FATAL ERROR: Apple Accelerate only works on macOS.")

View File

@ -9,8 +9,10 @@ add_subdirectory(./faiss)
include_directories(./faiss)
if(COMPILE_CPU)
set(INTGEMM_DONT_BUILD_TESTS ON CACHE BOOL "Disable intgemm tests")
add_subdirectory(./intgemm)
if(NOT GENERATE_MARIAN_INSTALL_TARGETS)
set(INTGEMM_DONT_BUILD_TESTS ON CACHE BOOL "Disable intgemm tests")
add_subdirectory(./intgemm)
endif()
endif(COMPILE_CPU)
if(USE_FBGEMM)
@ -69,7 +71,9 @@ if(USE_SENTENCEPIECE)
endif()
# regardless of -DUSE_STATIC_LIBS setting always build sentencepiece statically
set(SPM_ENABLE_SHARED OFF CACHE BOOL "Builds shared libaries in addition to static libraries." FORCE)
if(NOT GENERATE_MARIAN_INSTALL_TARGETS)
set(SPM_ENABLE_SHARED OFF CACHE BOOL "Builds shared libaries in addition to static libraries." FORCE)
endif()
set(SPM_ENABLE_TCMALLOC ON CACHE BOOL "Enable TCMalloc if available.")
if(USE_STATIC_LIBS)