summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorModestas Vainius <modax@debian.org>2011-06-12 14:40:01 (GMT)
committerBrad King <brad.king@kitware.com>2011-06-13 15:12:23 (GMT)
commit1ed19bcb25edc5f1911b5d0237db34426e747cd2 (patch)
treeb40b7b0a07a346de153b02429e6f6b1275e6b089
parent52a6ed2aed6ad2ed6880e76535359a6b45fda253 (diff)
downloadCMake-1ed19bcb25edc5f1911b5d0237db34426e747cd2.zip
CMake-1ed19bcb25edc5f1911b5d0237db34426e747cd2.tar.gz
CMake-1ed19bcb25edc5f1911b5d0237db34426e747cd2.tar.bz2
multiarch: Set CMAKE_LIBRARY_ARCHITECTURE_REGEX for Linux|Hurd|kFreeBSD
* Fix linux CMAKE_LIBRARY_ARCHITECTURE_REGEX to support armel-linux-gnueabi. * Add CMAKE_LIBRARY_ARCHITECTURE_REGEX on kFreeBSD. * Add CMAKE_LIBRARY_ARCHITECTURE_REGEX on GNU (Hurd). Also regex is improved to support quadlets. Even if I have not seen this in the wild yet, reportedly they are possible.
-rw-r--r--Modules/Platform/GNU.cmake2
-rw-r--r--Modules/Platform/Linux.cmake2
-rw-r--r--Modules/Platform/kFreeBSD.cmake2
3 files changed, 5 insertions, 1 deletions
diff --git a/Modules/Platform/GNU.cmake b/Modules/Platform/GNU.cmake
index e0ed86c..4bcfd51 100644
--- a/Modules/Platform/GNU.cmake
+++ b/Modules/Platform/GNU.cmake
@@ -8,4 +8,6 @@ SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
SET(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
+SET(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-gnu[a-z0-9_]*")
+
INCLUDE(Platform/UnixPaths)
diff --git a/Modules/Platform/Linux.cmake b/Modules/Platform/Linux.cmake
index 57d1b34..38f469b 100644
--- a/Modules/Platform/Linux.cmake
+++ b/Modules/Platform/Linux.cmake
@@ -46,7 +46,7 @@ ELSE(DEFINED CMAKE_INSTALL_SO_NO_EXE)
ENDIF(DEFINED CMAKE_INSTALL_SO_NO_EXE)
# Match multiarch library directory names.
-SET(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+-linux-gnu")
+SET(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-linux-gnu[a-z0-9_]*")
INCLUDE(Platform/UnixPaths)
diff --git a/Modules/Platform/kFreeBSD.cmake b/Modules/Platform/kFreeBSD.cmake
index ff050de..c1295fb 100644
--- a/Modules/Platform/kFreeBSD.cmake
+++ b/Modules/Platform/kFreeBSD.cmake
@@ -1,2 +1,4 @@
# kFreeBSD looks just like Linux.
INCLUDE(Platform/Linux)
+
+SET(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-kfreebsd-gnu[a-z0-9_]*")