[llvm] r213532 - Export LLVM_ENABLE_ASSERTIONS in LLVMConfig.cmake so clients know
Dan Liew
dan at su-root.co.uk
Mon Jul 21 07:17:15 PDT 2014
Author: delcypher
Date: Mon Jul 21 09:17:15 2014
New Revision: 213532
URL: http://llvm.org/viewvc/llvm-project?rev=213532&view=rev
Log:
Export LLVM_ENABLE_ASSERTIONS in LLVMConfig.cmake so clients know
if the version of LLVM they are trying to use was built with or
without assertions.
Modified:
llvm/trunk/cmake/modules/CMakeLists.txt
llvm/trunk/cmake/modules/LLVMConfig.cmake.in
llvm/trunk/cmake/modules/Makefile
Modified: llvm/trunk/cmake/modules/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/CMakeLists.txt?rev=213532&r1=213531&r2=213532&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/CMakeLists.txt (original)
+++ llvm/trunk/cmake/modules/CMakeLists.txt Mon Jul 21 09:17:15 2014
@@ -17,7 +17,6 @@ endforeach(lib)
set(LLVM_CONFIG_CODE "
# LLVM_BUILD_* values available only from LLVM build tree.
set(LLVM_BUILD_BINARY_DIR \"${LLVM_BINARY_DIR}\")
-set(LLVM_BUILD_ENABLE_ASSERTIONS \"${LLVM_ENABLE_ASSERTIONS}\")
set(LLVM_BUILD_LIBRARY_DIR \"${LLVM_LIBRARY_DIR}\")
set(LLVM_BUILD_MAIN_INCLUDE_DIR \"${LLVM_MAIN_INCLUDE_DIR}\")
set(LLVM_BUILD_MAIN_SRC_DIR \"${LLVM_MAIN_SRC_DIR}\")
Modified: llvm/trunk/cmake/modules/LLVMConfig.cmake.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/LLVMConfig.cmake.in?rev=213532&r1=213531&r2=213532&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/LLVMConfig.cmake.in (original)
+++ llvm/trunk/cmake/modules/LLVMConfig.cmake.in Mon Jul 21 09:17:15 2014
@@ -21,6 +21,8 @@ set(LLVM_TARGETS_WITH_JIT @LLVM_TARGETS_
set(TARGET_TRIPLE "@TARGET_TRIPLE@")
+set(LLVM_ENABLE_ASSERTIONS @LLVM_ENABLE_ASSERTIONS@)
+
set(LLVM_ENABLE_TERMINFO @LLVM_ENABLE_TERMINFO@)
set(LLVM_ENABLE_THREADS @LLVM_ENABLE_THREADS@)
Modified: llvm/trunk/cmake/modules/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/Makefile?rev=213532&r1=213531&r2=213532&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/Makefile (original)
+++ llvm/trunk/cmake/modules/Makefile Mon Jul 21 09:17:15 2014
@@ -15,6 +15,12 @@ include $(LEVEL)/Makefile.common
PROJ_cmake := $(DESTDIR)$(PROJ_prefix)/share/llvm/cmake
+ifeq ($(DISABLE_ASSERTIONS),1)
+ LLVM_ENABLE_ASSERTIONS := 0
+else
+ LLVM_ENABLE_ASSERTIONS := 1
+endif
+
OBJMODS := LLVMConfig.cmake LLVMConfigVersion.cmake LLVMExports.cmake
$(PROJ_OBJ_DIR)/LLVMConfig.cmake: LLVMConfig.cmake.in $(LLVMBuildCMakeFrag)
@@ -32,6 +38,7 @@ $(PROJ_OBJ_DIR)/LLVMConfig.cmake: LLVMCo
-e 's/@LLVM_TARGETS_TO_BUILD@/'"$(TARGETS_TO_BUILD)"'/' \
-e 's/@LLVM_TARGETS_WITH_JIT@/'"$(TARGETS_WITH_JIT)"'/' \
-e 's/@TARGET_TRIPLE@/'"$(TARGET_TRIPLE)"'/' \
+ -e 's/@LLVM_ENABLE_ASSERTIONS@/'"$(LLVM_ENABLE_ASSERTIONS)"'/' \
-e 's/@LLVM_ENABLE_TERMINFO@/'"$(ENABLE_TERMINFO)"'/' \
-e 's/@LLVM_ENABLE_THREADS@/'"$(ENABLE_THREADS)"'/' \
-e 's/@LLVM_ENABLE_ZLIB@/'"$(ENABLE_ZLIB)"'/' \
More information about the llvm-commits
mailing list