From 4332f9eea11b5911f0b03c90df310a48e22114a5 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 13 Jan 2017 18:39:15 +0000 Subject: Bindings: Determine the clang suffix from the filename if cached The suffix is used later to run the clang executable in order to determine the built-in system includes. --- find-modules/FindPythonModuleGeneration.cmake | 3 +++ 1 file changed, 3 insertions(+) (limited to 'find-modules/FindPythonModuleGeneration.cmake') diff --git a/find-modules/FindPythonModuleGeneration.cmake b/find-modules/FindPythonModuleGeneration.cmake index 4ef316a0..88f553dd 100644 --- a/find-modules/FindPythonModuleGeneration.cmake +++ b/find-modules/FindPythonModuleGeneration.cmake @@ -194,6 +194,9 @@ if (NOT libclang_LIBRARY) set(_GPB_CLANG_SUFFIX 3.${_LIBCLANG3_FIND_VERSION}) find_library(libclang_LIBRARY clang-3.${_LIBCLANG3_FIND_VERSION}) endwhile() +else() + string(REGEX MATCH ".*clang-([0-9]+\\.[0-9]+).*" _GPB_CLANG_SUFFIX ${libclang_LIBRARY}) + set(_GPB_CLANG_SUFFIX ${CMAKE_MATCH_1}) endif() if (NOT libclang_LIBRARY) -- cgit v1.2.1