From 75d33878ab75618f169939f9b6941a5c4794336f Mon Sep 17 00:00:00 2001 From: Andrew Trick Date: Thu, 23 Jun 2011 17:52:36 +0000 Subject: cmake+lit: handle ENABLE_ASSERTIONS feature properly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133725 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CMakeLists.txt | 6 ++++++ test/Makefile | 2 +- test/lit.site.cfg.in | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2db58b9dcc..2634f79cf2 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -79,6 +79,12 @@ if(PYTHONINTERP_FOUND) set(ENABLE_SHARED ${LLVM_SHARED_LIBS_ENABLED}) set(SHLIBPATH_VAR ${SHLIBPATH_VAR}) + if(LLVM_ENABLE_ASSERTIONS) + set(ENABLE_ASSERTIONS "1") + else() + set(ENABLE_ASSERTIONS "0") + endif(LLVM_ENABLE_ASSERTIONS) + # lit.site.cfg uses the config-time build mode set(LLVM_BUILD_MODE "${LLVM_BUILD_MODE}") diff --git a/test/Makefile b/test/Makefile index 4e34e7222e..c0bc36c54d 100644 --- a/test/Makefile +++ b/test/Makefile @@ -185,7 +185,7 @@ lit.site.cfg: site.exp @$(ECHOPATH) s=@LLVMGCCDIR@=$(LLVMGCCDIR)=g >> lit.tmp @$(ECHOPATH) s=@PYTHON_EXECUTABLE@=python=g >> lit.tmp @$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> lit.tmp - @$(ECHOPATH) s=@LLVM_ENABLE_ASSERTIONS@=$(ENABLE_ASSERTIONS)=g >> lit.tmp + @$(ECHOPATH) s=@ENABLE_ASSERTIONS@=$(ENABLE_ASSERTIONS)=g >> lit.tmp @sed -f lit.tmp $(PROJ_SRC_DIR)/lit.site.cfg.in > $@ @-rm -f lit.tmp diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in index 6c33831124..fe152ef499 100644 --- a/test/lit.site.cfg.in +++ b/test/lit.site.cfg.in @@ -7,7 +7,7 @@ config.llvmgcc_dir = "@LLVMGCCDIR@" config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@" config.python_executable = "@PYTHON_EXECUTABLE@" config.enable_shared = @ENABLE_SHARED@ -config.enable_assertions = @LLVM_ENABLE_ASSERTIONS@ +config.enable_assertions = @ENABLE_ASSERTIONS@ # Support substitution of the tools_dir with user parameters. This is # used when we can't determine the tool dir at configuration time. -- cgit v1.2.3