diff options
author | Louis Dionne <ldionne@apple.com> | 2019-03-12 13:48:25 +0000 |
---|---|---|
committer | Louis Dionne <ldionne@apple.com> | 2019-03-12 13:48:25 +0000 |
commit | 0f4ce2b0d748a0503d6dbadbc44486dda4b5df8e (patch) | |
tree | 17b7d2c725bfe257452eb8e0d21923e41931764e | |
parent | e62e93e1d83096e5d458efaa4afeae66841d16e5 (diff) | |
download | bcm5719-llvm-0f4ce2b0d748a0503d6dbadbc44486dda4b5df8e.tar.gz bcm5719-llvm-0f4ce2b0d748a0503d6dbadbc44486dda4b5df8e.zip |
[pstl] Properly extract the version number from pstl_config.h
Previously, we'd be performing math on `#define PSTL_VERSION NNN` instead
of just `NNN`. It seems like older CMakes didn't complain, but newer
CMakes do complain because it doesn't make sense.
llvm-svn: 355918
-rw-r--r-- | pstl/CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pstl/CMakeLists.txt b/pstl/CMakeLists.txt index 5446851a9e1..b283b60909a 100644 --- a/pstl/CMakeLists.txt +++ b/pstl/CMakeLists.txt @@ -10,7 +10,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h") file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define PSTL_VERSION .*$") -string(REGEX MATCH "#define PSTL_VERSION (.*)$" PARALLELSTL_VERSION_SOURCE "${PARALLELSTL_VERSION_SOURCE}") +string(REGEX REPLACE "#define PSTL_VERSION (.*)$" "\\1" PARALLELSTL_VERSION_SOURCE "${PARALLELSTL_VERSION_SOURCE}") math(EXPR VERSION_MAJOR "${PARALLELSTL_VERSION_SOURCE} / 100") math(EXPR VERSION_MINOR "${PARALLELSTL_VERSION_SOURCE} % 100") |