[compiler-rt] r204238 - [CMake] Fix build of ASan tests on Mac

Alexey Samsonov samsonov at google.com
Wed Mar 19 07:45:41 PDT 2014


Author: samsonov
Date: Wed Mar 19 09:45:40 2014
New Revision: 204238

URL: http://llvm.org/viewvc/llvm-project?rev=204238&view=rev
Log:
[CMake] Fix build of ASan tests on Mac

Modified:
    compiler-rt/trunk/lib/asan/tests/CMakeLists.txt

Modified: compiler-rt/trunk/lib/asan/tests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/CMakeLists.txt?rev=204238&r1=204237&r2=204238&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/asan/tests/CMakeLists.txt Wed Mar 19 09:45:40 2014
@@ -30,7 +30,6 @@ set(ASAN_UNITTEST_COMMON_CFLAGS
   -Wno-format
   -Werror
   -Werror=sign-compare
-  -std=c++11
   -g
   -O2)
 append_if(COMPILER_RT_HAS_WNO_VARIADIC_MACROS_FLAG -Wno-variadic-macros ASAN_UNITTEST_COMMON_CFLAGS)
@@ -147,7 +146,7 @@ macro(add_asan_tests_for_arch arch)
   set(ASAN_INST_TEST_OBJECTS)
   foreach(src ${ASAN_INST_TEST_SOURCES})
     asan_compile(ASAN_INST_TEST_OBJECTS ${src} ${arch}
-                 ${ASAN_UNITTEST_INSTRUMENTED_CFLAGS})
+                 ${ASAN_UNITTEST_INSTRUMENTED_CFLAGS} -std=c++11)
   endforeach()
   if (APPLE)
     # Add Mac-specific helper.
@@ -181,7 +180,7 @@ macro(add_asan_tests_for_arch arch)
   set(ASAN_NOINST_TEST_OBJECTS)
   foreach(src ${ASAN_NOINST_TEST_SOURCES})
     asan_compile(ASAN_NOINST_TEST_OBJECTS ${src} ${arch}
-                 ${ASAN_UNITTEST_COMMON_CFLAGS})
+                 ${ASAN_UNITTEST_COMMON_CFLAGS} -std=c++11)
   endforeach()
   add_asan_test(AsanUnitTests "Asan-${arch}-Noinst-Test" ${arch}
                 OBJECTS ${ASAN_NOINST_TEST_OBJECTS}
@@ -192,7 +191,7 @@ macro(add_asan_tests_for_arch arch)
   set(ASAN_BENCHMARKS_OBJECTS)
   foreach(src ${ASAN_BENCHMARKS_SOURCES})
     asan_compile(ASAN_BENCHMARKS_OBJECTS ${src} ${arch}
-                 ${ASAN_UNITTEST_INSTRUMENTED_CFLAGS})
+                 ${ASAN_UNITTEST_INSTRUMENTED_CFLAGS} -std=c++11)
   endforeach()
   add_asan_test(AsanBenchmarks "Asan-${arch}-Benchmark" ${arch}
                 OBJECTS ${ASAN_BENCHMARKS_OBJECTS}





More information about the llvm-commits mailing list