[test-suite] r286195 - cmake: Fix ObjC/ObjC++ unittests

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 7 18:17:12 PST 2016


Author: matze
Date: Mon Nov  7 20:17:11 2016
New Revision: 286195

URL: http://llvm.org/viewvc/llvm-project?rev=286195&view=rev
Log:
cmake: Fix ObjC/ObjC++ unittests

The initial Makefile->cmake conversion missed *.m/*.mm files.

Add an option to llvm_singlesource() to specify the set of files to
test.

Modified:
    test-suite/trunk/SingleSource/UnitTests/ObjC++/CMakeLists.txt
    test-suite/trunk/SingleSource/UnitTests/ObjC/CMakeLists.txt
    test-suite/trunk/cmake/modules/SingleMultiSource.cmake

Modified: test-suite/trunk/SingleSource/UnitTests/ObjC++/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/ObjC%2B%2B/CMakeLists.txt?rev=286195&r1=286194&r2=286195&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/ObjC++/CMakeLists.txt (original)
+++ test-suite/trunk/SingleSource/UnitTests/ObjC++/CMakeLists.txt Mon Nov  7 20:17:11 2016
@@ -1,4 +1,3 @@
 list(APPEND LDFLAGS -lstdc++ -lobjc -framework Foundation)
-if(DEFINED CC_UNDER_TEST_IS_LLVM_GCC)
-  set(PROGRAMS_TO_SKIP property-reference-object)
-endif()
+file(GLOB Source *.mm)
+llvm_singlesource()

Modified: test-suite/trunk/SingleSource/UnitTests/ObjC/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/ObjC/CMakeLists.txt?rev=286195&r1=286194&r2=286195&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/ObjC/CMakeLists.txt (original)
+++ test-suite/trunk/SingleSource/UnitTests/ObjC/CMakeLists.txt Mon Nov  7 20:17:11 2016
@@ -1,5 +1,4 @@
 set(DISABLE_JIT 1)
 list(APPEND LDFLAGS -lobjc -framework Foundation)
-if(DEFINED CC_UNDER_TEST_IS_LLVM_GCC)
-  set(EXEC_XFAILS dot-syntax-2)
-endif()
+file(GLOB Source *.m)
+llvm_singlesource()

Modified: test-suite/trunk/cmake/modules/SingleMultiSource.cmake
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/cmake/modules/SingleMultiSource.cmake?rev=286195&r1=286194&r2=286195&view=diff
==============================================================================
--- test-suite/trunk/cmake/modules/SingleMultiSource.cmake (original)
+++ test-suite/trunk/cmake/modules/SingleMultiSource.cmake Mon Nov  7 20:17:11 2016
@@ -185,7 +185,11 @@ macro(llvm_singlesource)
   if(_LSARG_PREFIX)
     list(APPEND _llvm_singlesource_extra_args PREFIX ${_LSARG_PREFIX})
   endif()
-  file(GLOB sources *.c *.cpp *.cc)
+  if(DEFINED Source)
+    set(sources ${Source})
+  else()
+    file(GLOB sources *.c *.cpp *.cc)
+  endif()
   foreach(source ${sources})
     basename(name ${source})
     llvm_test_executable(${name} TARGET_VAR _llvm_single_source_target




More information about the llvm-commits mailing list