cmake+lit: handle ENABLE_ASSERTIONS feature properly.
authorAndrew Trick <atrick@apple.com>
Thu, 23 Jun 2011 17:52:36 +0000 (17:52 +0000)
committerAndrew Trick <atrick@apple.com>
Thu, 23 Jun 2011 17:52:36 +0000 (17:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133725 91177308-0d34-0410-b5e6-96231b3b80d8

test/CMakeLists.txt
test/Makefile
test/lit.site.cfg.in

index 2db58b9dcc571346053d17b1206aeb0b8ec24ef6..2634f79cf2807812c802d5e08dff79fb37a94244 100644 (file)
@@ -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}")
 
index 4e34e7222e58fba73aa4de197ed9005801515d05..c0bc36c54dbc67f1abc68e26adc6068bd4cc43af 100644 (file)
@@ -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
 
index 6c33831124a94a62a5a7a6bc74f98f1464e3952d..fe152ef499fb10aa058f2409ab9c1c6f169ad1e7 100644 (file)
@@ -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.