llvm.org GIT mirror llvm / 285c821
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213532 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Liew 5 years ago
3 changed file(s) with 9 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
1616 set(LLVM_CONFIG_CODE "
1717 # LLVM_BUILD_* values available only from LLVM build tree.
1818 set(LLVM_BUILD_BINARY_DIR \"${LLVM_BINARY_DIR}\")
19 set(LLVM_BUILD_ENABLE_ASSERTIONS \"${LLVM_ENABLE_ASSERTIONS}\")
2019 set(LLVM_BUILD_LIBRARY_DIR \"${LLVM_LIBRARY_DIR}\")
2120 set(LLVM_BUILD_MAIN_INCLUDE_DIR \"${LLVM_MAIN_INCLUDE_DIR}\")
2221 set(LLVM_BUILD_MAIN_SRC_DIR \"${LLVM_MAIN_SRC_DIR}\")
1919 @all_llvm_lib_deps@
2020
2121 set(TARGET_TRIPLE "@TARGET_TRIPLE@")
22
23 set(LLVM_ENABLE_ASSERTIONS @LLVM_ENABLE_ASSERTIONS@)
2224
2325 set(LLVM_ENABLE_TERMINFO @LLVM_ENABLE_TERMINFO@)
2426
1313 include $(LEVEL)/Makefile.common
1414
1515 PROJ_cmake := $(DESTDIR)$(PROJ_prefix)/share/llvm/cmake
16
17 ifeq ($(DISABLE_ASSERTIONS),1)
18 LLVM_ENABLE_ASSERTIONS := 0
19 else
20 LLVM_ENABLE_ASSERTIONS := 1
21 endif
1622
1723 OBJMODS := LLVMConfig.cmake LLVMConfigVersion.cmake LLVMExports.cmake
1824
3137 -e 's/@LLVM_TARGETS_TO_BUILD@/'"$(TARGETS_TO_BUILD)"'/' \
3238 -e 's/@LLVM_TARGETS_WITH_JIT@/'"$(TARGETS_WITH_JIT)"'/' \
3339 -e 's/@TARGET_TRIPLE@/'"$(TARGET_TRIPLE)"'/' \
40 -e 's/@LLVM_ENABLE_ASSERTIONS@/'"$(LLVM_ENABLE_ASSERTIONS)"'/' \
3441 -e 's/@LLVM_ENABLE_TERMINFO@/'"$(ENABLE_TERMINFO)"'/' \
3542 -e 's/@LLVM_ENABLE_THREADS@/'"$(ENABLE_THREADS)"'/' \
3643 -e 's/@LLVM_ENABLE_ZLIB@/'"$(ENABLE_ZLIB)"'/' \