From faa2c90f7ccd651950f2da8d0f0932997b6c0f47 Mon Sep 17 00:00:00 2001 From: Huachao Huang Date: Thu, 18 Oct 2018 11:19:51 -0700 Subject: [PATCH] cmake: fix FORCE_SSE42 (#4490) Summary: When HAVE_SSE42 is true, it should always add "-msse4.2 -mpclmul" no matter if FORCE_SSE42 is true or not. Pull Request resolved: https://github.com/facebook/rocksdb/pull/4490 Differential Revision: D10384256 Pulled By: yiwu-arbug fbshipit-source-id: c82bc988f017981a0f84ddc136f36e2366c3ea8a --- CMakeLists.txt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ab252095..41a6f710b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -683,12 +683,10 @@ set(SOURCES utilities/write_batch_with_index/write_batch_with_index_internal.cc $) -if(HAVE_SSE42 AND NOT FORCE_SSE42) - if(NOT MSVC) -set_source_files_properties( - util/crc32c.cc - PROPERTIES COMPILE_FLAGS "-msse4.2 -mpclmul") - endif() +if(HAVE_SSE42 AND NOT MSVC) + set_source_files_properties( + util/crc32c.cc + PROPERTIES COMPILE_FLAGS "-msse4.2 -mpclmul") endif() if(HAVE_POWER8)