--- CMakeLists.txt.orig 2024-09-04 20:01:18 UTC +++ CMakeLists.txt @@ -181,7 +181,7 @@ set(CPU_INTEL OFF) set(CPU_AARCH64 OFF) set(CPU_INTEL OFF) -if(CMAKE_SYSTEM_PROCESSOR MATCHES "(AMD64|x86_64)") +if(CMAKE_SYSTEM_PROCESSOR MATCHES "(amd64|x86_64)") set(CPU_INTEL ON) elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)") set(CPU_AARCH64 ON) @@ -210,7 +210,7 @@ option(BUILD_CUSTOM_PROTOBUF option(BUILD_BINARY "Build C++ binaries" OFF) option(BUILD_DOCS "Build Caffe2 documentation" OFF) option(BUILD_CUSTOM_PROTOBUF - "Build and use Caffe2's own protobuf under third_party" ON) + "Build and use Caffe2's own protobuf under third_party" OFF) option(BUILD_PYTHON "Build Python binaries" ON) option(BUILD_LITE_INTERPRETER "Master flag to build Lite Interpreter" OFF) option(BUILD_SHARED_LIBS "Build libcaffe2.so" ON) @@ -451,15 +451,15 @@ option(USE_SYSTEM_CPUINFO "Use system-provided cpuinfo # USE_SYSTEM_LIBS being "OFF". option(USE_SYSTEM_LIBS "Use all available system-provided libraries." OFF) option(USE_SYSTEM_CPUINFO "Use system-provided cpuinfo." OFF) -option(USE_SYSTEM_SLEEF "Use system-provided sleef." OFF) +option(USE_SYSTEM_SLEEF "Use system-provided sleef." ON) option(USE_SYSTEM_GLOO "Use system-provided gloo." OFF) option(USE_SYSTEM_FP16 "Use system-provided fp16." OFF) -option(USE_SYSTEM_PYBIND11 "Use system-provided PyBind11." OFF) +option(USE_SYSTEM_PYBIND11 "Use system-provided PyBind11." ON) option(USE_SYSTEM_PTHREADPOOL "Use system-provided pthreadpool." OFF) option(USE_SYSTEM_PSIMD "Use system-provided psimd." OFF) option(USE_SYSTEM_FXDIV "Use system-provided fxdiv." OFF) option(USE_SYSTEM_BENCHMARK "Use system-provided google benchmark." OFF) -option(USE_SYSTEM_ONNX "Use system-provided onnx." OFF) +option(USE_SYSTEM_ONNX "Use system-provided onnx." ON) option(USE_SYSTEM_XNNPACK "Use system-provided xnnpack." OFF) option(USE_GOLD_LINKER "Use ld.gold to link" OFF) if(USE_SYSTEM_LIBS) @@ -971,11 +971,11 @@ if(NOT MSVC) # Details at http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1459 string(APPEND CMAKE_CXX_FLAGS " -Wall") string(APPEND CMAKE_CXX_FLAGS " -Wextra") - append_cxx_flag_if_supported("-Werror=return-type" CMAKE_CXX_FLAGS) - append_cxx_flag_if_supported("-Werror=non-virtual-dtor" CMAKE_CXX_FLAGS) - append_cxx_flag_if_supported("-Werror=braced-scalar-init" CMAKE_CXX_FLAGS) - append_cxx_flag_if_supported("-Werror=range-loop-construct" CMAKE_CXX_FLAGS) - append_cxx_flag_if_supported("-Werror=bool-operation" CMAKE_CXX_FLAGS) + #append_cxx_flag_if_supported("-Werror=return-type" CMAKE_CXX_FLAGS) + #append_cxx_flag_if_supported("-Werror=non-virtual-dtor" CMAKE_CXX_FLAGS) + #append_cxx_flag_if_supported("-Werror=braced-scalar-init" CMAKE_CXX_FLAGS) + #append_cxx_flag_if_supported("-Werror=range-loop-construct" CMAKE_CXX_FLAGS) + #append_cxx_flag_if_supported("-Werror=bool-operation" CMAKE_CXX_FLAGS) append_cxx_flag_if_supported("-Wnarrowing" CMAKE_CXX_FLAGS) append_cxx_flag_if_supported("-Wno-missing-field-initializers" CMAKE_CXX_FLAGS)