about summary refs log tree commit diff homepage
path: root/unittests/Makefile
diff options
context:
space:
mode:
authorDan Liew <delcypher@gmail.com>2013-12-20 08:15:46 +0000
committerDan Liew <delcypher@gmail.com>2013-12-20 08:15:46 +0000
commitc5510caa2a0ce6ad9a153fee094fe50855313450 (patch)
tree311c5b5ac080e04526885e4682a5bfe5210f0fa1 /unittests/Makefile
parent2c04a50f501d861da765ee8d3a0d3531dcbd52af (diff)
downloadklee-c5510caa2a0ce6ad9a153fee094fe50855313450.tar.gz
Fix compilation of unittests under Clang.
It seems the GTest header file in LLVM 3.3 (and possibly other versions)
makes use of typeid() but the build system passes -fno-rtti. These
are incompatible and if building with Clang then compilation will
fail. GCC doesn't seem to care!
Diffstat (limited to 'unittests/Makefile')
-rw-r--r--unittests/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/unittests/Makefile b/unittests/Makefile
index 761987d6..dd005620 100644
--- a/unittests/Makefile
+++ b/unittests/Makefile
@@ -14,5 +14,9 @@ DIRS = Expr Solver Ref
 
 include $(LEVEL)/Makefile.common
 
+# Remove -fno-rtti as this prevents typeid() being used
+# in gtest
+CXX.Flags := $(filter-out -fno-rtti,$(CPP.Flags))
+
 clean::
 	$(Verb) $(RM) -f *Tests