diff options
author | Stephen Kelly <steveire@gmail.com> | 2017-01-13 18:39:15 +0000 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2017-01-13 18:40:10 +0000 |
commit | 4332f9eea11b5911f0b03c90df310a48e22114a5 (patch) | |
tree | dcde37e1b13c302bf989fea90cd0452c0ae64d65 /find-modules/FindPythonModuleGeneration.cmake | |
parent | 029798941a1082b8d5f00b7aaa234615d96844ca (diff) | |
download | extra-cmake-modules-4332f9eea11b5911f0b03c90df310a48e22114a5.tar.gz extra-cmake-modules-4332f9eea11b5911f0b03c90df310a48e22114a5.tar.bz2 |
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.
Diffstat (limited to 'find-modules/FindPythonModuleGeneration.cmake')
-rw-r--r-- | find-modules/FindPythonModuleGeneration.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
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) |