Skip to content
Snippets Groups Projects
Commit 1e4f54d2 authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

COMP: inform users about sse checks

parent 87ce955b
Branches
Tags
No related merge requests found
......@@ -6,6 +6,12 @@ function(check_sse_features sse_flags )
set(has_sse FALSE)
set(${sse_flags} "0" PARENT_SCOPE)
# For apple assume sse2 is on for all intel builds, check for 64 and 32 bit versions
if(APPLE)
message(STATUS "For apple assume sse2 is on for all intel builds")
return()
endif()
if( CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX )
set(CMAKE_REQUIRED_FLAGS "-msse2")
check_cxx_source_runs("
......
......@@ -289,13 +289,10 @@ macro(check_compiler_platform_flags)
if(OTB_USE_SSE_FLAGS)
include(OTBCheckSSEFeatures)
check_sse_features(OTB_SSE_FLAGS)
endif()
if(OTB_SSE_FLAGS)
message(STATUS "Using SSE2 extensions")
set(OTB_REQUIRED_CXX_FLAGS "${OTB_REQUIRED_CXX_FLAGS} ${OTB_SSE_FLAGS}")
else()
message(STATUS "Not using SSE2 extensions")
if(OTB_SSE_FLAGS)
message(STATUS "Adding OTB_SSE_FLAGS(${OTB_SSE_FLAGS}) to OTB_REQUIRED_CXX_FLAGS")
set(OTB_REQUIRED_CXX_FLAGS "${OTB_REQUIRED_CXX_FLAGS} ${OTB_SSE_FLAGS}")
endif()
endif()
#-----------------------------------------------------------------------------
......@@ -304,6 +301,7 @@ macro(check_compiler_platform_flags)
# will be produced. This is first documented in the gcc4 man page.
if(CMAKE_COMPILER_IS_GNUCXX)
set(ALL_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS} ${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_MODULE_LINKER_FLAGS}" )
#TODO: list(REMOVE_DUPLICATES ALL_FLAGS)
separate_arguments(ALL_FLAGS)
foreach(COMP_OPTION ${ALL_FLAGS})
if("${COMP_OPTION}" STREQUAL "-frename-registers")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment