mirror of
https://github.com/ceph/ceph
synced 2025-02-23 11:07:35 +00:00
cmake: introduce WITH_EC_ISA_PLUGIN
instead of checking "HAVE_NASM_X64_AVX2 OR HAVE_ARMV8_SIMD" everywhere, use a single cached variable of WITH_EC_ISA_PLUGIN. so it's more consistent when checking the availability of ec_isa plugin. Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
3798cc6592
commit
bed1b32974
@ -2753,7 +2753,7 @@ std::vector<Option> get_global_options() {
|
||||
|
||||
Option("osd_erasure_code_plugins", Option::TYPE_STR, Option::LEVEL_ADVANCED)
|
||||
.set_default("jerasure lrc"
|
||||
#if defined(HAVE_NASM_X64_AVX2) || defined(HAVE_ARMV8_SIMD)
|
||||
#if defined(WITH_EC_ISA_PLUGIN)
|
||||
" isa"
|
||||
#endif
|
||||
)
|
||||
|
@ -23,6 +23,10 @@ add_subdirectory(shec)
|
||||
add_subdirectory(clay)
|
||||
|
||||
if(HAVE_NASM_X64_AVX2 OR HAVE_ARMV8_SIMD)
|
||||
set(WITH_EC_ISA_PLUGIN TRUE CACHE BOOL "")
|
||||
endif()
|
||||
|
||||
if(WITH_EC_ISA_PLUGIN)
|
||||
add_subdirectory(isa)
|
||||
set(EC_ISA_LIB ec_isa)
|
||||
endif()
|
||||
|
@ -250,14 +250,11 @@
|
||||
/* we have a recent nasm and are x86_64 */
|
||||
#cmakedefine HAVE_NASM_X64
|
||||
|
||||
/* nasm can also build the isa-l:avx2 */
|
||||
#cmakedefine HAVE_NASM_X64_AVX2
|
||||
|
||||
/* nasm can also build the isa-l:avx512 */
|
||||
#cmakedefine HAVE_NASM_X64_AVX512
|
||||
|
||||
/* Define if isa-l is compiled for arm64 */
|
||||
#cmakedefine HAVE_ARMV8_SIMD
|
||||
/* Define if the erasure code isa-l plugin is compiled */
|
||||
#cmakedefine WITH_EC_ISA_PLUGIN
|
||||
|
||||
/* Define to 1 if strerror_r returns char *. */
|
||||
#cmakedefine STRERROR_R_CHAR_P 1
|
||||
|
@ -74,7 +74,7 @@ target_link_libraries(unittest_erasure_code_plugin_jerasure
|
||||
add_dependencies(unittest_erasure_code_plugin_jerasure
|
||||
ec_jerasure)
|
||||
|
||||
if(HAVE_NASM_X64_AVX2 OR HAVE_ARMV8_SIMD)
|
||||
if(WITH_EC_ISA_PLUGIN)
|
||||
|
||||
#unittest_erasure_code_isa
|
||||
add_executable(unittest_erasure_code_isa
|
||||
@ -105,7 +105,7 @@ target_link_libraries(unittest_erasure_code_plugin_isa
|
||||
)
|
||||
add_dependencies(unittest_erasure_code_plugin_isa
|
||||
ec_isa)
|
||||
endif(HAVE_NASM_X64_AVX2 OR HAVE_ARMV8_SIMD)
|
||||
endif(WITH_EC_ISA_PLUGIN)
|
||||
|
||||
# unittest_erasure_code_lrc
|
||||
add_executable(unittest_erasure_code_lrc
|
||||
|
@ -58,7 +58,7 @@ TEST(ErasureCodePlugin, factory)
|
||||
EXPECT_TRUE(erasure_code.get());
|
||||
}
|
||||
}
|
||||
#ifdef HAVE_NASM_X64_AVX2
|
||||
#ifdef WITH_EC_ISA_PLUGIN
|
||||
//check clay plugin with scalar_mds=isa
|
||||
{
|
||||
const char *techniques[] = {
|
||||
|
Loading…
Reference in New Issue
Block a user