File: avoid_-msse

package info (click to toggle)
gatb-core 1.4.2%2Bdfsg-13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 18,592 kB
  • sloc: cpp: 49,096; sh: 2,218; xml: 1,333; makefile: 44; python: 32
file content (51 lines) | stat: -rw-r--r-- 2,548 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Author: Michael R. Crusoe <michael.crusoe@gmail.com>
Description: Avoid -msse2 due to building on qemu
--- gatb-core.orig/gatb-core/CMakeLists.txt
+++ gatb-core/gatb-core/CMakeLists.txt
@@ -121,44 +121,8 @@
     set (LIBRARY_COMPILE_DEFINITIONS  "${LIBRARY_COMPILE_DEFINITIONS}  -DNONCANONICAL=1")
 endif()
 
-
-# detect SSE for popcount 
-# this was for emphf, maybe it's for something else also? otherwise this part can be removed.
-#
-# from https://github.com/rurban/smhasher/blob/master/CMakeLists.txt
-# i do not see much performance gain for now, but let's keep that code here, might be useful later.
-# list of performance gain observed:
-# popcount in Graph::countNeighbors
-IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-    EXEC_PROGRAM(cat ARGS "/proc/cpuinfo" OUTPUT_VARIABLE CPUINFO)
-    STRING(REGEX REPLACE "^.*(sse2).*$" "\\1" SSE_THERE ${CPUINFO})
-    STRING(COMPARE EQUAL "sse2" "${SSE_THERE}" SSE2_TRUE)
-    STRING(REGEX REPLACE "^.*(sse4_2).*$" "\\1" SSE_THERE ${CPUINFO})
-    STRING(COMPARE EQUAL "sse4_2" "${SSE_THERE}" SSE42_TRUE)
-ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
-    EXEC_PROGRAM("/usr/sbin/sysctl -n machdep.cpu.features" OUTPUT_VARIABLE
-        CPUINFO)
-    STRING(REGEX REPLACE "^.*[^S](SSE2).*$" "\\1" SSE_THERE ${CPUINFO})
-    STRING(COMPARE EQUAL "SSE2" "${SSE_THERE}" SSE2_TRUE)
-    STRING(REGEX REPLACE "^.*(SSE4.2).*$" "\\1" SSE_THERE ${CPUINFO})
-    STRING(COMPARE EQUAL "SSE4.2" "${SSE_THERE}" SSE42_TRUE)
-ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-IF (SSE2_TRUE)
-    set(SSE2_FOUND true CACHE BOOL "SSE2 available")
-ELSE (SSE2_TRUE)
-    set(SSE2_FOUND false CACHE BOOL "SSE2 not available")
-ENDIF (SSE2_TRUE)
-IF (SSE42_TRUE)
-    set(SSE4_2_FOUND true CACHE BOOL "SSE4.2 available")
-ELSE (SSE42_TRUE)
-    set(SSE4_2_FOUND false CACHE BOOL "SSE4.2 not available")
-ENDIF (SSE42_TRUE)
-# I could use LIBRARY_COMPILE_DEFINITIONS, but it's actually passed to "add_definitions", which isn't made for passing compilation flags, only -D ones.
-IF(SSE4_2_FOUND AND (NOT NO_SSE))
-    set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -msse2 -msse4.2 -mpopcnt")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -msse4.2 -mpopcnt")
-    message ("-- SSE 4.2 detected")
-ENDIF()
+set(SSE2_FOUND false CACHE BOOL "SSE2 not available")
+set(SSE4_2_FOUND false CACHE BOOL "SSE4.2 not available")
 
 # WARNING !!! For the moment, we need to remove some warnings (on Macos) due to use of offsetof macro on non Plain Old Data
 set (LIBRARY_COMPILE_DEFINITIONS "${LIBRARY_COMPILE_DEFINITIONS} -Wno-invalid-offsetof")