aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules/AddLLVM.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/AddLLVM.cmake')
-rw-r--r--cmake/modules/AddLLVM.cmake32
1 files changed, 30 insertions, 2 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
index 7f63644..50cee30 100644
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
@@ -338,10 +338,10 @@ function(llvm_add_library name)
PREFIX ""
)
endif()
-
+
set_target_properties(${name}
PROPERTIES
- SOVERSION ${LLVM_VERSION_MAJOR}
+ SOVERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}
VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX})
endif()
@@ -490,6 +490,12 @@ macro(add_llvm_executable name)
endif( LLVM_COMMON_DEPENDS )
endmacro(add_llvm_executable name)
+function(export_executable_symbols target)
+ if (NOT MSVC) # MSVC's linker doesn't support exporting all symbols.
+ set_target_properties(${target} PROPERTIES ENABLE_EXPORTS 1)
+ endif()
+endfunction()
+
set (LLVM_TOOLCHAIN_TOOLS
llvm-ar
@@ -780,3 +786,25 @@ function(add_lit_testsuite target comment)
ARGS ${ARG_ARGS}
)
endfunction()
+
+function(add_lit_testsuites project directory)
+ if (NOT CMAKE_CONFIGURATION_TYPES)
+ parse_arguments(ARG "PARAMS;DEPENDS;ARGS" "" ${ARGN})
+ file(GLOB_RECURSE litCfg ${directory}/lit*.cfg)
+ foreach(f ${litCfg})
+ get_filename_component(dir ${f} DIRECTORY)
+ string(REPLACE ${directory} "" name_slash ${dir})
+ if (name_slash)
+ string(REPLACE "/" "-" name_slash ${name_slash})
+ string(REPLACE "\\" "-" name_dashes ${name_slash})
+ string(TOLOWER "${project}${name_dashes}" name_var)
+ add_lit_target("check-${name_var}" "Running lit suite ${dir}"
+ ${dir}
+ PARAMS ${ARG_PARAMS}
+ DEPENDS ${ARG_DEPENDS}
+ ARGS ${ARG_ARGS}
+ )
+ endif()
+ endforeach()
+ endif()
+endfunction()