Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[CMAKE][ARM] USE_SSE option to govern USE_SSE in mshadow and -msse2 compil… #8395

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ include(cmake/Utils.cmake)
mxnet_option(USE_OPENCV "Build with OpenCV support" ON)
mxnet_option(USE_OPENMP "Build with Openmp support" ON)
mxnet_option(USE_CUDA "Build with CUDA support" ON)
mxnet_option(USE_SSE "Build with SSE support" ON)
mxnet_option(USE_CUDNN "Build with cudnn support" ON) # one could set CUDNN_ROOT for search path
mxnet_option(USE_LAPACK "Build with lapack support" ON IF NOT MSVC)
mxnet_option(USE_MKL_IF_AVAILABLE "Use MKL if found" ON)
Expand Down Expand Up @@ -52,7 +53,9 @@ else(MSVC)
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-std=c++11" SUPPORT_CXX11)
check_cxx_compiler_flag("-std=c++0x" SUPPORT_CXX0X)
check_cxx_compiler_flag("-msse2" SUPPORT_MSSE2)
if(USE_SSE)
check_cxx_compiler_flag("-msse2" SUPPORT_MSSE2)
endif()
set(CMAKE_C_FLAGS "-Wall -Wno-unknown-pragmas -fPIC -Wno-sign-compare")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g")
Expand All @@ -63,7 +66,7 @@ else(MSVC)
add_definitions(-DNDEBUG=1)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
endif()
if(SUPPORT_MSSE2)
if(USE_SSE AND SUPPORT_MSSE2)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2")
endif()
set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
Expand Down
2 changes: 1 addition & 1 deletion mshadow