summaryrefslogtreecommitdiff
blob: e244c94e8e4c1a3f498118374e26d89220f927e8 (plain)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Remove CFLAGS/CXXFLAGS setting which is not desired in Gentoo

--- shogun-4.1.0/cmake/FindAtlas.cmake
+++ shogun-4.1.0/cmake/FindAtlas.cmake
@@ -20,10 +20,10 @@
   endif()
   unset(CMAKE_REQUIRED_LIBRARIES CACHE)
 else()
-  find_file(ATLAS_LAPACK liblapack.so.3 PATHS /usr/lib/atlas /usr/lib64/atlas)
-  find_library(ATLAS_LAPACK NAMES lapack)
-  set(CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES} ${ATLAS_CBLAS})
-  check_library_exists("${ATLAS_LAPACK}" clapack_dpotrf "" FOUND_CLAPACK)
+  # find_file(ATLAS_LAPACK liblapack.so.3 PATHS /usr/lib/atlas /usr/lib64/atlas)
+  # find_library(ATLAS_LAPACK NAMES lapack)
+  # set(CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES} ${ATLAS_CBLAS})
+  check_library_exists("${ATLAS_LIBRARIES}" clapack_dpotrf "" FOUND_CLAPACK)
   if(NOT FOUND_CLAPACK)
     unset(ATLAS_LAPACK CACHE)
   endif()
--- shogun-4.1.0/CMakeLists.txt
+++ shogun-4.1.0/CMakeLists.txt
@@ -23,15 +23,6 @@
 SET(EIGEN_VERSION_MINIMUM 3.1.2)
 SET(VIENNACL_VERSION_MINIMUM 1.5.0)
 
-# Store system's or distribution's C[XX]FLAGS.
-SET(SYSTEM_C_FLAGS "${CMAKE_C_FLAGS}")
-SET(SYSTEM_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
-STRING(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE_UC)
-IF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION"))
-	SET(CMAKE_C_FLAGS "")
-	SET(CMAKE_CXX_FLAGS "")
-ENDIF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION"))
-
 # CCACHE
 OPTION(ENABLE_CCACHE "Enable ccache for compilation" ON)
 FIND_PACKAGE(CCache)
@@ -145,20 +136,8 @@
 	SET(COMPILER_WARNINGS "-Wall -Wno-unused-parameter -Wformat -Wformat-security -Wparentheses -Wshadow -Wno-unknown-pragmas -Wno-deprecated")
 ENDIF()
 
-IF(CMAKE_COMPILER_IS_GNUCXX)
-	SET(RELEASE_COMPILER_FLAGS "-fexpensive-optimizations -frerun-cse-after-loop -fcse-follow-jumps -finline-functions -fschedule-insns2 -fthread-jumps -fforce-addr -fstrength-reduce -funroll-loops -mfpmath=sse")
-ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-	SET(RELEASE_COMPILER_FLAGS "-funroll-loops")
-ENDIF()
-SET(SWIG_CXX_COMPILER_FLAGS "-O0 -g")
 SET(CMAKE_C_FLAGS "${COMPILER_WARNINGS} ${CMAKE_C_FLAGS}")
 SET(CMAKE_CXX_FLAGS "${COMPILER_WARNINGS} ${CMAKE_CXX_FLAGS}")
-SET(CMAKE_C_FLAGS_RELEASE "-O3 ${RELEASE_COMPILER_FLAGS}")
-SET(CMAKE_CXX_FLAGS_RELEASE "-O3 ${RELEASE_COMPILER_FLAGS}")
-SET(CMAKE_C_FLAGS_DISTRIBUTION "-O2")
-SET(CMAKE_CXX_FLAGS_DISTRIBUTION "-O2")
-SET(CMAKE_C_FLAGS_DEBUG "-g")
-SET(CMAKE_CXX_FLAGS_DEBUG "-g")
 
 OPTION(ENABLE_COVERAGE "Enable code coverage" OFF)
 IF(ENABLE_COVERAGE)
@@ -881,21 +860,7 @@
 OPTION(USE_SWIG_DIRECTORS "Enable SWIG director classes" OFF)
 
 # Respect system's or distribution's C[XX]FLAGS.
-OPTION(SWIG_WITH_SYSTEM_CFLAGS "Enable system's C[XX]FLAGS for compilation of swig-binaries" ON)
-
-IF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION"))
-	SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SYSTEM_C_FLAGS}")
-	SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SYSTEM_CXX_FLAGS}")
-ENDIF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION"))
-
-IF(SWIG_WITH_SYSTEM_CFLAGS)
-	SET(SWIG_CXX_COMPILER_FLAGS "${SWIG_CXX_COMPILER_FLAGS} ${SYSTEM_CXX_FLAGS}")
-ENDIF(SWIG_WITH_SYSTEM_CFLAGS)
-
-OPTION(REDUCE_SWIG_DEBUG "Reduce debuginfo when compiling interfaces" OFF)
-IF(REDUCE_SWIG_DEBUG)
-	SET(SWIG_CXX_COMPILER_FLAGS "${SWIG_CXX_COMPILER_FLAGS} -g1")
-ENDIF(REDUCE_SWIG_DEBUG)
+SET(SWIG_CXX_COMPILER_FLAGS "${CMAKE_CXX_FLAGS}")
 
 # python modular
 IF (PythonModular OR PythonStatic)