summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJehan <jehan@girinstud.io>2017-11-06 02:07:40 +0100
committerJehan <jehan@girinstud.io>2017-11-06 02:07:40 +0100
commit77bf71ea365a19ac55c59cf10399b566a02d82c1 (patch)
tree1bfe00e08f63c6c55b2f5d5c1799b2f5e24a8a79
parent5996bbd995aed5045cc22e4d1fab08c989377983 (diff)
CMake: rename s/ENABLE_SSE2/CHECK_SSE2/.
"ENABLE_SSE2" may be misleading since having it ON does not necessarily mean that SSE2 flags will be actually set. It only means that the support will be checked (then set only when supported). Also adding the warning about possible performance decrease.
-rw-r--r--CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 61f5fdf..5d1ff0e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,7 +38,7 @@ include(GNUInstallDirs)
option(BUILD_BINARY "Build executable" ON)
option(BUILD_SHARED_LIBS "Build shared library and link executable to it" ON)
-option(ENABLE_SSE2 "Enable SSE2 extensions if the compiler supports it" ON)
+option(CHECK_SSE2 "Check and enable SSE2 extensions if supported. Disabling SSE on platforms which support it may decrease performances." ON)
if (BUILD_SHARED_LIBS)
option(BUILD_STATIC "Build static library" ON)
@@ -46,13 +46,13 @@ endif (BUILD_SHARED_LIBS)
CHECK_C_COMPILER_FLAG(-msse2 SUPPORTS_CFLAG_SSE2)
CHECK_C_COMPILER_FLAG(-mfpmath=sse SUPPORTS_CFLAG_SSE_MATH)
-if (ENABLE_SSE2 AND SUPPORTS_CFLAG_SSE2 AND SUPPORTS_CFLAG_SSE_MATH)
+if (CHECK_SSE2 AND SUPPORTS_CFLAG_SSE2 AND SUPPORTS_CFLAG_SSE_MATH)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -mfpmath=sse")
-else (ENABLE_SSE2 AND SUPPORTS_CFLAG_SSE2 AND SUPPORTS_CFLAG_SSE_MATH)
+else (CHECK_SSE2 AND SUPPORTS_CFLAG_SSE2 AND SUPPORTS_CFLAG_SSE_MATH)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffloat-store")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffloat-store")
-endif (ENABLE_SSE2 AND SUPPORTS_CFLAG_SSE2 AND SUPPORTS_CFLAG_SSE_MATH)
+endif (CHECK_SSE2 AND SUPPORTS_CFLAG_SSE2 AND SUPPORTS_CFLAG_SSE_MATH)
configure_file(
uchardet.pc.in