summaryrefslogtreecommitdiff
path: root/lib/msan/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-06-10 09:09:40 +0000
committerAlexey Samsonov <samsonov@google.com>2013-06-10 09:09:40 +0000
commit7575e0a67bc9d4c0f16656ea022f19fc5c9142f9 (patch)
tree3da744e843ddefd5e268e17846d3e069b6ccb05b /lib/msan/CMakeLists.txt
parentc65fe5e5bcffeb424deb6a2e18cb674beead23e1 (diff)
[MSan] don't add msan unit tests to check-msan command if libcxx is not checked out
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183641 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/CMakeLists.txt')
-rw-r--r--lib/msan/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/msan/CMakeLists.txt b/lib/msan/CMakeLists.txt
index 0671b59c0..b3e88ea29 100644
--- a/lib/msan/CMakeLists.txt
+++ b/lib/msan/CMakeLists.txt
@@ -32,6 +32,14 @@ endif()
add_compiler_rt_resource_file(msan_blacklist msan_blacklist.txt)
+# We should only build MSan unit tests if we can build instrumented libcxx.
+set(MSAN_LIBCXX_PATH ${LLVM_MAIN_SRC_DIR}/projects/libcxx)
+if(EXISTS ${MSAN_LIBCXX_PATH}/)
+ set(MSAN_CAN_INSTRUMENT_LIBCXX TRUE)
+else()
+ set(MSAN_CAN_INSTRUMENT_LIBCXX FALSE)
+endif()
+
if(LLVM_INCLUDE_TESTS)
add_subdirectory(tests)
endif()