diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-11-03 08:39:07 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-11-03 16:39:54 +0000 |
commit | 7a787927a5482ea7bcc1377d95204fb7ab8feab2 (patch) | |
tree | 6ae8daf366a7da25fc3218a58dddf538070fa08c /wsutil/CMakeLists.txt | |
parent | bba77c3fc04e6fc7b9485611c99fbd9a5e3f12fe (diff) |
Don't use -msse4.2 with MSVC.
Change-Id: I457d45d9ad05e0eb851e78a7342e666ef9df8ffd
Reviewed-on: https://code.wireshark.org/review/5086
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wsutil/CMakeLists.txt')
-rw-r--r-- | wsutil/CMakeLists.txt | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt index bf9ebfc1d8..a7f0663ead 100644 --- a/wsutil/CMakeLists.txt +++ b/wsutil/CMakeLists.txt @@ -122,11 +122,23 @@ if (WERROR) ) endif() if (HAVE_SSE4_2) - set_source_files_properties( - ${WSUTIL_SSE42_FILES} - PROPERTIES - COMPILE_FLAGS -msse4.2 - ) + # + # 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(NOT CMAKE_C_COMPILER_ID MATCHES "MSVC") + set_source_files_properties( + ${WSUTIL_SSE42_FILES} + PROPERTIES + COMPILE_FLAGS -msse4.2 + ) + endif() endif() add_library(wsutil ${LINK_MODE_LIB} |