[pkg-d-commits] [ldc] 46/95: Clean up FindLLVM.cmake a bit
Matthias Klumpp
mak at moszumanska.debian.org
Thu Jul 13 20:53:59 UTC 2017
This is an automated email from the git hooks/post-receive script.
mak pushed a commit to annotated tag v1.3.0-beta1
in repository ldc.
commit c5565d79559e480479262e9170b1835cb22e04c0
Author: Martin <noone at nowhere.com>
Date: Sat Mar 11 21:25:38 2017 +0100
Clean up FindLLVM.cmake a bit
---
cmake/Modules/FindLLVM.cmake | 25 ++++---------------------
1 file changed, 4 insertions(+), 21 deletions(-)
diff --git a/cmake/Modules/FindLLVM.cmake b/cmake/Modules/FindLLVM.cmake
index 2062136..3bd95c6 100644
--- a/cmake/Modules/FindLLVM.cmake
+++ b/cmake/Modules/FindLLVM.cmake
@@ -97,7 +97,7 @@ if ((WIN32 AND NOT(MINGW OR CYGWIN)) OR NOT LLVM_CONFIG)
list(REMOVE_ITEM LLVM_FIND_COMPONENTS "debuginfocodeview" index)
list(REMOVE_ITEM LLVM_FIND_COMPONENTS "globalisel" index)
endif()
- if(${LLVM_VERSION_STRING} MATCHES "^3\\.[8-9][\\.0-9A-Za-z]*")
+ if(NOT ${LLVM_VERSION_STRING} MATCHES "^3\\.[0-7][\\.0-9A-Za-z]*")
# Versions beginning with 3.8 do not support component ipa
list(REMOVE_ITEM LLVM_FIND_COMPONENTS "ipa" index)
endif()
@@ -105,20 +105,12 @@ if ((WIN32 AND NOT(MINGW OR CYGWIN)) OR NOT LLVM_CONFIG)
# Versions below 4.0 do not support component debuginfomsf
list(REMOVE_ITEM LLVM_FIND_COMPONENTS "debuginfomsf" index)
endif()
- if(${LLVM_VERSION_STRING} MATCHES "^[4-9]\\.[\\.0-9A-Za-z]*")
- # Versions beginning with 4. do not support component ipa
- list(REMOVE_ITEM LLVM_FIND_COMPONENTS "ipa" index)
- endif()
- if(${LLVM_VERSION_STRING} MATCHES "^3\\.[0-4][\\.0-9A-Za-z]*")
- llvm_map_components_to_libraries(tmplibs ${LLVM_FIND_COMPONENTS})
- else()
- llvm_map_components_to_libnames(tmplibs ${LLVM_FIND_COMPONENTS})
- endif()
+ llvm_map_components_to_libnames(tmplibs ${LLVM_FIND_COMPONENTS})
if(MSVC)
set(LLVM_LDFLAGS "-LIBPATH:\"${LLVM_LIBRARY_DIRS}\"")
foreach(lib ${tmplibs})
- list(APPEND LLVM_LIBRARIES "${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX}")
+ list(APPEND LLVM_LIBRARIES "${lib}.lib")
endforeach()
else()
# Rely on the library search path being set correctly via -L on
@@ -198,7 +190,7 @@ else()
list(REMOVE_ITEM LLVM_FIND_COMPONENTS "debuginfocodeview" index)
list(REMOVE_ITEM LLVM_FIND_COMPONENTS "globalisel" index)
endif()
- if(${LLVM_VERSION_STRING} MATCHES "^3\\.[8-9][\\.0-9A-Za-z]*")
+ if(NOT ${LLVM_VERSION_STRING} MATCHES "^3\\.[0-7][\\.0-9A-Za-z]*")
# Versions beginning with 3.8 do not support component ipa
list(REMOVE_ITEM LLVM_FIND_COMPONENTS "ipa" index)
endif()
@@ -206,10 +198,6 @@ else()
# Versions below 4.0 do not support component debuginfomsf
list(REMOVE_ITEM LLVM_FIND_COMPONENTS "debuginfomsf" index)
endif()
- if(${LLVM_VERSION_STRING} MATCHES "^[4-9]\\.[\\.0-9A-Za-z]*")
- # Versions beginning with 4. do not support component ipa
- list(REMOVE_ITEM LLVM_FIND_COMPONENTS "ipa" index)
- endif()
llvm_set(LDFLAGS ldflags)
if(NOT ${LLVM_VERSION_STRING} MATCHES "^3\\.[0-4][\\.0-9A-Za-z]*")
@@ -249,11 +237,6 @@ endif()
# Use the default CMake facilities for handling QUIET/REQUIRED.
include(FindPackageHandleStandardArgs)
-if(${CMAKE_VERSION} VERSION_LESS "2.8.4")
- # The VERSION_VAR argument is not supported on pre-2.8.4, work around this.
- set(VERSION_VAR dummy)
-endif()
-
find_package_handle_standard_args(LLVM
REQUIRED_VARS LLVM_ROOT_DIR LLVM_HOST_TARGET
VERSION_VAR LLVM_VERSION_STRING)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git
More information about the pkg-d-commits
mailing list