[PATCH] D15082: Fix the cross compilation of unit tests. NFC

Sumanth Gundapaneni via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 11:38:40 PST 2016


sgundapa added inline comments.

================
Comment at: cmake/Modules/AddCompilerRT.cmake:174
@@ -170,4 +173,3 @@
 # Unittests support.
-set(COMPILER_RT_GTEST_PATH ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest)
-set(COMPILER_RT_GTEST_SOURCE ${COMPILER_RT_GTEST_PATH}/src/gtest-all.cc)
-set(COMPILER_RT_GTEST_CFLAGS
+set(COMPILER_RT_GOOGLE_UNITTEST_PATH ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest)
+set(COMPILER_RT_GOOGLE_UNITTEST_SOURCE ${COMPILER_RT_GOOGLE_UNITTEST_PATH}/src/gtest-all.cc)
----------------
samsonov wrote:
> No, please leave COMPILER_RT_GTEST_* variables intact: GTest is the name of unittest framework.
Ok. I will push a new patch with out any changes to GTEST_*

================
Comment at: lib/asan/tests/CMakeLists.txt:40
@@ +39,3 @@
+set(ASAN_UNITTEST_COMMON_LINKFLAGS
+  "${COMPILER_RT_UNITTEST_LINKFLAGS}")
+
----------------
samsonov wrote:
> Why do you need quotes here?
I guess, it is generally safe to wrap a variable with quotes which holds a value with spaces/colons. Let me know if you think otherwise.
I am not an expert in CMake
 


http://reviews.llvm.org/D15082





More information about the llvm-commits mailing list