aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-01-20 18:44:17 -0800
committerGuy Harris <guy@alum.mit.edu>2015-01-21 02:45:35 +0000
commitbf239535b9c054d7d8d919558ff352c8ce648842 (patch)
tree2ef12823067d1bbf411396d0dcc056e4f94c9183 /CMakeLists.txt
parentf2151025401d345a9ce1c2ee0860dc69d1c6d9c0 (diff)
Only turn -msse4.2 on for ws_mempbrk_sse42.c, and don't always build it.
Move all the SSE 4.2 stuff to wsutil/CMakeLists.txt. Don't put ws_mempbrk_sse42.c in WSUTIL_FILES by default; add it if we think the compiler supports compiling for SSE 4.2. Add -msse4.2 to its COMPILE_FLAGS, but don't add it to any other compiler flags - we don't want to build anything else with -msse4.2 by default, as the only code that uses SSE 4.2 instructions but *only* does so if the processor supports it is our mempbrk implementation. (And *add* it, don't *replace* the existing flags with -msse4.2; that way, -Werror is left in there as well.) Change-Id: I979b37a37e4b88b3af11e2275e89441118c8ce0a Reviewed-on: https://code.wireshark.org/review/6698 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt20
1 files changed, 0 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8c5fe20a42..5ac836e7de 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -404,26 +404,6 @@ foreach(THIS_FLAG ${CPP_FLAG_TESTS})
endforeach()
set(CMAKE_CXX_FLAGS "${ADDED_CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS}")
-#
-# XXX - we're assuming MSVC supports the SSE 4.2 intrinsics and
-# that other C compilers support them iff they support the
-# -msse4.2 flag.
-#
-# Perhaps we should check whether we can compile something
-# that uses them, instead, and do something else to figure
-# out what compiler flag, if any, we need to pass to the
-# compiler to compile code that uses them.
-#
-if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
- set(HAVE_SSE4_2 TRUE)
-else()
- message(STATUS "Checking for c-compiler flag: -msse4.2")
- check_c_compiler_flag(-msse4.2 HAVE_SSE4_2)
- if(HAVE_SSE4_2)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.2")
- endif()
-endif()
-
check_c_compiler_flag(-fvisibility=hidden FVHIDDEN)
if(FVHIDDEN)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")