--- caffe2/CMakeLists.txt.orig	2024-06-05 19:17:56 UTC
+++ caffe2/CMakeLists.txt
@@ -1,6 +1,8 @@ include(../cmake/Codegen.cmake)
 # ---[ Generate and install header and cpp files
 include(../cmake/Codegen.cmake)
 
+set(CMAKE_CXX_STANDARD 17)
+
 # ---[ Vulkan code gen
 if(USE_VULKAN)
   include(../cmake/VulkanCodegen.cmake)
@@ -561,7 +563,7 @@ endif()
 endif()
 
 # Enable conditional FP16 arithmetic intrinsics
-if(CPU_AARCH64 AND LINUX)
+if(CPU_AARCH64 AND CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
 set_source_files_properties(${TORCH_ROOT}/aten/src/ATen/native/BlasKernel.cpp PROPERTIES COMPILE_FLAGS "-march=armv8.2-a+fp16")
 endif()
 
