View | Details | Raw Unified | Return to bug 196399 | Differences between
and this patch

Collapse All | Expand All

(-)databases/mariadb100-client/files/patch-cmake__abi_check.cmake (+11 lines)
Line 0 Link Here
1
--- cmake/abi_check.cmake.orig	2015-01-25 16:21:36.000000000 +0100
2
+++ cmake/abi_check.cmake	2015-02-16 08:10:48.713277000 +0100
3
@@ -28,7 +28,7 @@
4
  SET(RUN_ABI_CHECK 0)
5
 ENDIF()
6
 
7
-IF(CMAKE_COMPILER_IS_GNUCC AND RUN_ABI_CHECK)
8
+IF((CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" MATCHES "Clang") AND RUN_ABI_CHECK)
9
   IF(CMAKE_C_COMPILER MATCHES "ccache$")
10
     SET(COMPILER ${CMAKE_C_COMPILER_ARG1})
11
     STRING(REGEX REPLACE "^ " "" COMPILER ${COMPILER})
(-)databases/mariadb100-client/files/patch-cmake__libutils.cmake (+11 lines)
Line 0 Link Here
1
--- cmake/libutils.cmake.orig	2015-01-25 16:21:37.000000000 +0100
2
+++ cmake/libutils.cmake	2015-02-16 08:11:44.031803000 +0100
3
@@ -308,7 +308,7 @@
4
 
5
 SET(VISIBILITY_HIDDEN_FLAG)
6
 
7
-IF(CMAKE_COMPILER_IS_GNUCXX AND UNIX)
8
+IF((CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") AND UNIX)
9
   CHECK_C_COMPILER_FLAG("-fvisibility=hidden" HAVE_VISIBILITY_HIDDEN)
10
   IF(HAVE_VISIBILITY_HIDDEN)
11
     SET(VISIBILITY_HIDDEN_FLAG "-fvisibility=hidden")
(-)databases/mariadb100-client/files/patch-configure.cmake (+29 lines)
Line 0 Link Here
1
--- configure.cmake.orig	2015-01-25 16:21:37.000000000 +0100
2
+++ configure.cmake	2015-02-16 08:03:30.688438000 +0100
3
@@ -52,7 +52,7 @@
4
   ENDIF()
5
 ENDIF()
6
 
7
-IF(CMAKE_COMPILER_IS_GNUCXX)
8
+IF(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
9
   # MySQL "canonical" GCC flags. At least -fno-rtti flag affects
10
   # ABI and cannot be simply removed. 
11
   SET(CMAKE_CXX_FLAGS 
12
@@ -874,7 +874,7 @@
13
 # Assume regular sprintf
14
 SET(SPRINTFS_RETURNS_INT 1)
15
 
16
-IF(CMAKE_COMPILER_IS_GNUCXX AND HAVE_CXXABI_H)
17
+IF((CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") AND HAVE_CXXABI_H)
18
 CHECK_CXX_SOURCE_COMPILES("
19
  #include <cxxabi.h>
20
  int main(int argc, char **argv) 
21
@@ -946,7 +946,7 @@
22
 MARK_AS_ADVANCED(NO_ALARM)
23
 
24
 
25
-IF(CMAKE_COMPILER_IS_GNUCXX)
26
+IF(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
27
 IF(WITH_ATOMIC_OPS STREQUAL "up")
28
   SET(MY_ATOMIC_MODE_DUMMY 1 CACHE BOOL "Assume single-CPU mode, no concurrency")
29
 ELSEIF(WITH_ATOMIC_OPS STREQUAL "rwlocks")
(-)databases/mariadb100-client/files/patch-scripts_CMakeLists.txt (-8 / +26 lines)
Lines 1-6 Link Here
1
--- scripts/CMakeLists.txt.orig	2014-08-09 00:13:37.000000000 +0200
1
--- scripts/CMakeLists.txt.orig	2014-08-09 00:13:37.000000000 +0200
2
+++ scripts/CMakeLists.txt	2014-09-05 22:33:01.060378167 +0200
2
+++ scripts/CMakeLists.txt	2014-09-05 22:33:01.060378167 +0200
3
@@ -72,6 +72,7 @@
3
@@ -73,6 +73,7 @@
4
 )
4
 )
5
 ENDIF()
5
 ENDIF()
6
 
6
 
Lines 8-14 Link Here
8
 INSTALL(FILES 
8
 INSTALL(FILES 
9
   ${CMAKE_CURRENT_SOURCE_DIR}/mysql_system_tables.sql 
9
   ${CMAKE_CURRENT_SOURCE_DIR}/mysql_system_tables.sql 
10
   ${CMAKE_CURRENT_SOURCE_DIR}/mysql_system_tables_data.sql
10
   ${CMAKE_CURRENT_SOURCE_DIR}/mysql_system_tables_data.sql
11
@@ -81,6 +82,7 @@
11
@@ -82,6 +83,7 @@
12
   ${FIX_PRIVILEGES_SQL}
12
   ${FIX_PRIVILEGES_SQL}
13
   DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT Server
13
   DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT Server
14
 )
14
 )
Lines 16-22 Link Here
16
 
16
 
17
 # TCMalloc hacks
17
 # TCMalloc hacks
18
 IF(MALLOC_LIB)
18
 IF(MALLOC_LIB)
19
@@ -140,6 +142,7 @@
19
@@ -134,6 +136,7 @@
20
 SET(HOSTNAME "hostname")
20
 SET(HOSTNAME "hostname")
21
 SET(MYSQLD_USER "mysql")
21
 SET(MYSQLD_USER "mysql")
22
 
22
 
Lines 24-30 Link Here
24
 # Required for mysqlbug until autotools are deprecated, once done remove these
24
 # Required for mysqlbug until autotools are deprecated, once done remove these
25
 # and expand default cmake variables
25
 # and expand default cmake variables
26
 SET(CC ${CMAKE_C_COMPILER})
26
 SET(CC ${CMAKE_C_COMPILER})
27
@@ -180,6 +183,7 @@
27
@@ -147,7 +150,7 @@
28
 
29
 # Also required for mysqlbug, autoconf only supports --version so for now we
30
 # just explicitly require GNU
31
-IF(CMAKE_COMPILER_IS_GNUCC)
32
+IF(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
33
   EXECUTE_PROCESS(
34
     COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1} --version
35
     COMMAND sed 1q
36
@@ -155,7 +158,7 @@
37
 ELSE()
38
   SET(CC_VERSION "")
39
 ENDIF()
40
-IF(CMAKE_COMPILER_IS_GNUCXX)
41
+IF(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
42
   EXECUTE_PROCESS(
43
     COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} --version
44
     COMMAND sed 1q
45
@@ -174,6 +177,7 @@
28
   DESTINATION ${INSTALL_BINDIR}
46
   DESTINATION ${INSTALL_BINDIR}
29
   COMPONENT Server
47
   COMPONENT Server
30
   )
48
   )
Lines 32-38 Link Here
32
 
50
 
33
 ENDIF(UNIX)
51
 ENDIF(UNIX)
34
 
52
 
35
@@ -204,6 +208,7 @@
53
@@ -198,6 +202,7 @@
36
   SET(localstatedir ${MYSQL_DATADIR})
54
   SET(localstatedir ${MYSQL_DATADIR})
37
 ENDIF()
55
 ENDIF()
38
 
56
 
Lines 40-46 Link Here
40
 IF(UNIX)
58
 IF(UNIX)
41
 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.sh
59
 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.sh
42
   ${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db ESCAPE_QUOTES @ONLY)
60
   ${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db ESCAPE_QUOTES @ONLY)
43
@@ -219,6 +224,7 @@
61
@@ -213,6 +218,7 @@
44
   COMPONENT Server
62
   COMPONENT Server
45
   )
63
   )
46
 ENDIF()
64
 ENDIF()
Lines 48-54 Link Here
48
 
66
 
49
 SET(prefix "${CMAKE_INSTALL_PREFIX}")
67
 SET(prefix "${CMAKE_INSTALL_PREFIX}")
50
 IF(INSTALL_SYSCONFDIR)
68
 IF(INSTALL_SYSCONFDIR)
51
@@ -281,6 +287,8 @@
69
@@ -275,6 +281,8 @@
52
             STRING(REGEX REPLACE "^lib" "" lib "${lib}")
70
             STRING(REGEX REPLACE "^lib" "" lib "${lib}")
53
             SET(${var} "${${var}}-l${lib} " ) 
71
             SET(${var} "${${var}}-l${lib} " ) 
54
           ENDIF()
72
           ENDIF()
Lines 57-63 Link Here
57
         ELSE()
75
         ELSE()
58
           SET(${var} "${${var}}-l${lib} " ) 
76
           SET(${var} "${${var}}-l${lib} " ) 
59
         ENDIF()
77
         ENDIF()
60
@@ -339,18 +347,8 @@
78
@@ -333,18 +341,8 @@
61
   SET(BIN_SCRIPTS
79
   SET(BIN_SCRIPTS
62
     msql2mysql
80
     msql2mysql
63
     mysql_config
81
     mysql_config
(-)databases/mariadb100-server/files/patch-cmake__abi_check.cmake (+11 lines)
Line 0 Link Here
1
--- cmake/abi_check.cmake.orig	2015-01-25 16:21:36.000000000 +0100
2
+++ cmake/abi_check.cmake	2015-02-16 08:10:48.713277000 +0100
3
@@ -28,7 +28,7 @@
4
  SET(RUN_ABI_CHECK 0)
5
 ENDIF()
6
 
7
-IF(CMAKE_COMPILER_IS_GNUCC AND RUN_ABI_CHECK)
8
+IF((CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" MATCHES "Clang") AND RUN_ABI_CHECK)
9
   IF(CMAKE_C_COMPILER MATCHES "ccache$")
10
     SET(COMPILER ${CMAKE_C_COMPILER_ARG1})
11
     STRING(REGEX REPLACE "^ " "" COMPILER ${COMPILER})
(-)databases/mariadb100-server/files/patch-cmake__libutils.cmake (+11 lines)
Line 0 Link Here
1
--- cmake/libutils.cmake.orig	2015-01-25 16:21:37.000000000 +0100
2
+++ cmake/libutils.cmake	2015-02-16 08:11:44.031803000 +0100
3
@@ -308,7 +308,7 @@
4
 
5
 SET(VISIBILITY_HIDDEN_FLAG)
6
 
7
-IF(CMAKE_COMPILER_IS_GNUCXX AND UNIX)
8
+IF((CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") AND UNIX)
9
   CHECK_C_COMPILER_FLAG("-fvisibility=hidden" HAVE_VISIBILITY_HIDDEN)
10
   IF(HAVE_VISIBILITY_HIDDEN)
11
     SET(VISIBILITY_HIDDEN_FLAG "-fvisibility=hidden")
(-)databases/mariadb100-server/files/patch-configure.cmake (+29 lines)
Line 0 Link Here
1
--- configure.cmake.orig	2015-01-25 16:21:37.000000000 +0100
2
+++ configure.cmake	2015-02-16 08:03:30.688438000 +0100
3
@@ -52,7 +52,7 @@
4
   ENDIF()
5
 ENDIF()
6
 
7
-IF(CMAKE_COMPILER_IS_GNUCXX)
8
+IF(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
9
   # MySQL "canonical" GCC flags. At least -fno-rtti flag affects
10
   # ABI and cannot be simply removed. 
11
   SET(CMAKE_CXX_FLAGS 
12
@@ -874,7 +874,7 @@
13
 # Assume regular sprintf
14
 SET(SPRINTFS_RETURNS_INT 1)
15
 
16
-IF(CMAKE_COMPILER_IS_GNUCXX AND HAVE_CXXABI_H)
17
+IF((CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") AND HAVE_CXXABI_H)
18
 CHECK_CXX_SOURCE_COMPILES("
19
  #include <cxxabi.h>
20
  int main(int argc, char **argv) 
21
@@ -946,7 +946,7 @@
22
 MARK_AS_ADVANCED(NO_ALARM)
23
 
24
 
25
-IF(CMAKE_COMPILER_IS_GNUCXX)
26
+IF(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
27
 IF(WITH_ATOMIC_OPS STREQUAL "up")
28
   SET(MY_ATOMIC_MODE_DUMMY 1 CACHE BOOL "Assume single-CPU mode, no concurrency")
29
 ELSEIF(WITH_ATOMIC_OPS STREQUAL "rwlocks")
(-)databases/mariadb100-server/files/patch-scripts_CMakeLists.txt (-3 / +21 lines)
Lines 1-6 Link Here
1
--- scripts/CMakeLists.txt.orig	2014-08-09 00:13:37.000000000 +0200
1
--- scripts/CMakeLists.txt.orig	2015-01-25 16:21:37.000000000 +0100
2
+++ scripts/CMakeLists.txt	2014-09-05 19:06:46.206250221 +0200
2
+++ scripts/CMakeLists.txt	2015-02-16 08:05:31.396913000 +0100
3
@@ -281,6 +281,8 @@
3
@@ -147,7 +147,7 @@
4
 
5
 # Also required for mysqlbug, autoconf only supports --version so for now we
6
 # just explicitly require GNU
7
-IF(CMAKE_COMPILER_IS_GNUCC)
8
+IF(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
9
   EXECUTE_PROCESS(
10
     COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1} --version
11
     COMMAND sed 1q
12
@@ -155,7 +155,7 @@
13
 ELSE()
14
   SET(CC_VERSION "")
15
 ENDIF()
16
-IF(CMAKE_COMPILER_IS_GNUCXX)
17
+IF(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
18
   EXECUTE_PROCESS(
19
     COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} --version
20
     COMMAND sed 1q
21
@@ -275,6 +275,8 @@
4
             STRING(REGEX REPLACE "^lib" "" lib "${lib}")
22
             STRING(REGEX REPLACE "^lib" "" lib "${lib}")
5
             SET(${var} "${${var}}-l${lib} " ) 
23
             SET(${var} "${${var}}-l${lib} " ) 
6
           ENDIF()
24
           ENDIF()
(-)databases/mariadb100-server/files/patch-storage_mroonga_CMakeLists.txt (+20 lines)
Line 0 Link Here
1
--- storage/mroonga/CMakeLists.txt.orig	2015-01-25 16:21:37.000000000 +0100
2
+++ storage/mroonga/CMakeLists.txt	2015-02-16 08:08:00.175472000 +0100
3
@@ -265,7 +265,7 @@
4
   if(WITH_DEBUG)
5
     set_property(TARGET mroonga APPEND PROPERTY
6
       COMPILE_DEFINITIONS "SAFE_MUTEX")
7
-    if(CMAKE_COMPILER_IS_GNUCXX)
8
+    if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
9
       set(MRN_C_COMPILE_FLAGS "${MRN_C_COMPILE_FLAGS} -g3 -O0")
10
       set(MRN_CXX_COMPILE_FLAGS "${MRN_CXX_COMPILE_FLAGS} -g3 -O0")
11
     endif()
12
@@ -292,7 +292,7 @@
13
       COMPILE_DEFINITIONS "MY_PTHREAD_FASTMUTEX")
14
   endif()
15
 
16
-  if(CMAKE_COMPILER_IS_GNUCXX)
17
+  if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
18
     mrn_build_flag("-Wall")
19
     mrn_build_flag("-Wextra")
20
     mrn_build_flag("-Wno-unused-parameter")
(-)databases/mariadb100-server/files/patch-storage_mroonga_vendor_groonga_CMakeLists.txt (+30 lines)
Line 0 Link Here
1
--- storage/mroonga/vendor/groonga/CMakeLists.txt.orig	2015-01-25 16:21:37.000000000 +0100
2
+++ storage/mroonga/vendor/groonga/CMakeLists.txt	2015-02-16 08:08:56.333104000 +0100
3
@@ -115,7 +115,7 @@
4
   check_cxxflag(${flag})
5
 endmacro()
6
 
7
-if(CMAKE_COMPILER_IS_GNUCXX)
8
+if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
9
   check_build_flag("-Wall")
10
   check_build_flag("-Wextra")
11
   check_build_flag("-Wno-unused-but-set-variable")
12
@@ -144,7 +144,7 @@
13
 
14
 option(GRN_WITH_DEBUG "enable debug build." OFF)
15
 if(GRN_WITH_DEBUG)
16
-  if(CMAKE_COMPILER_IS_GNUCXX)
17
+  if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
18
     set(GRN_C_COMPILE_FLAGS "${GRN_C_COMPILE_FLAGS} -g3 -O0")
19
     set(GRN_CXX_COMPILE_FLAGS "${GRN_CXX_COMPILE_FLAGS} -g3 -O0")
20
   endif()
21
@@ -156,7 +156,8 @@
22
 
23
 if(CMAKE_COMPILER_IS_GNUC OR
24
     CMAKE_COMPILER_IS_GNUCXX OR
25
-    CMAKE_C_COMPILER_ID STREQUAL "Clang")
26
+    "${CMAKE_C_COMPILER_ID}" MATCHES "Clang" OR
27
+    "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
28
   set(_GNU_SOURCE TRUE)
29
 endif()
30
 

Return to bug 196399