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}")
+ # 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}")
+
+ # Ignore the major and minor versions of freebsd targets.
+ string(REGEX REPLACE "freebsd[0-9]+\\.[0-9]+" "freebsd"
+ GENERIC_TARGET_TRIPLE "${TARGET_TRIPLE}")
endif()
# Detect if we are building in the same configuration used to generate