aboutsummaryrefslogtreecommitdiff
path: root/lib/abi/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'lib/abi/CMakeLists.txt')
-rw-r--r--lib/abi/CMakeLists.txt15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/abi/CMakeLists.txt b/lib/abi/CMakeLists.txt
index e42e96173f536..bb9217f884727 100644
--- a/lib/abi/CMakeLists.txt
+++ b/lib/abi/CMakeLists.txt
@@ -1,9 +1,16 @@
if (DEFINED TARGET_TRIPLE)
- # Ignore the major, minor, and patchlevel versions of the darwin
- # target.
- string(REGEX REPLACE "darwin([0-9]+)\\.([0-9]+)\\.([0-9]+)" "darwin"
- GENERIC_TARGET_TRIPLE "${TARGET_TRIPLE}")
+ if (TARGET_TRIPLE MATCHES "darwin")
+ # Ignore the major, minor, and patchlevel versions of darwin targets.
+ string(REGEX REPLACE "darwin[0-9]+\\.[0-9]+\\.[0-9]+" "darwin"
+ GENERIC_TARGET_TRIPLE "${TARGET_TRIPLE}")
+ elseif(TARGET_TRIPLE MATCHES "freebsd")
+ # Ignore the major and minor versions of freebsd targets.
+ string(REGEX REPLACE "freebsd[0-9]+\\.[0-9]+" "freebsd"
+ GENERIC_TARGET_TRIPLE "${TARGET_TRIPLE}")
+ else()
+ set(GENERIC_TARGET_TRIPLE "${TARGET_TRIPLE}")
+ endif()
endif()
# Detect if we are building in the same configuration used to generate