about summary refs log tree commit diff homepage
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
authorDan Liew <daniel.liew@imperial.ac.uk>2017-01-19 10:33:18 +0000
committerDan Liew <daniel.liew@imperial.ac.uk>2017-01-19 11:50:41 +0000
commitf420cbee41ff68f8229b70e8b3ee9e1f13ed670f (patch)
tree9602bd99b8f405d6cf3a54b3f024f21290cfe734 /test/CMakeLists.txt
parent5454dd510f7414989440988c3df85d9bef6852c2 (diff)
downloadklee-f420cbee41ff68f8229b70e8b3ee9e1f13ed670f.tar.gz
Teach both build systems to pass the user provided CXXFLAGS and CFLAGS
when using the native compiler in system tests.

This fixes the `libkleeruntest` tests when building with ASan.
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r--test/CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 9f565444..a2a46e2a 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -13,8 +13,8 @@ set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}")
 # is shared by both build systems.
 set(LLVMCC "${LLVMCC} -I${CMAKE_SOURCE_DIR}/include")
 set(LLVMCXX "${LLVMCXX} -I${CMAKE_SOURCE_DIR}/include")
-set(NATIVE_CC "${CMAKE_C_COMPILER} -I ${CMAKE_SOURCE_DIR}/include")
-set(NATIVE_CXX "${CMAKE_CXX_COMPILER} -I ${CMAKE_SOURCE_DIR}/include")
+set(NATIVE_CC "${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} -I ${CMAKE_SOURCE_DIR}/include")
+set(NATIVE_CXX "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS} -I ${CMAKE_SOURCE_DIR}/include")
 set(TARGET_TRIPLE "${TARGET_TRIPLE}")
 if (ENABLE_KLEE_UCLIBC)
   set(ENABLE_UCLIBC 1)