[Openmp-commits] [openmp] c2c4f1c - [openmp][cmake] passing option argument correctly

Yuanfang Chen via Openmp-commits openmp-commits at lists.llvm.org
Thu Feb 13 09:34:20 PST 2020


Author: Yuanfang Chen
Date: 2020-02-13T09:33:58-08:00
New Revision: c2c4f1c1202ab5d66b3cf4b1d9769f3a8572d321

URL: https://github.com/llvm/llvm-project/commit/c2c4f1c1202ab5d66b3cf4b1d9769f3a8572d321
DIFF: https://github.com/llvm/llvm-project/commit/c2c4f1c1202ab5d66b3cf4b1d9769f3a8572d321.diff

LOG: [openmp][cmake] passing option argument correctly

>From the context, it looks like the test should not be run with `check-all`,
but it does. It turns out option argument resolving to True/False which
could not be passed down as is. There is one such example in
AddLLVM.cmake.

Added: 
    

Modified: 
    openmp/cmake/OpenMPTesting.cmake

Removed: 
    


################################################################################
diff  --git a/openmp/cmake/OpenMPTesting.cmake b/openmp/cmake/OpenMPTesting.cmake
index 9d613e361e11..c776b8ab6892 100644
--- a/openmp/cmake/OpenMPTesting.cmake
+++ b/openmp/cmake/OpenMPTesting.cmake
@@ -180,13 +180,22 @@ function(add_openmp_testsuite target comment)
       ${cmake_3_2_USES_TERMINAL}
     )
   else()
-    add_lit_testsuite(${target}
-      ${comment}
-      ${ARG_UNPARSED_ARGUMENTS}
-      ${ARG_EXCLUDE_FROM_CHECK_ALL}
-      DEPENDS clang clang-resource-headers FileCheck ${ARG_DEPENDS}
-      ARGS ${ARG_ARGS}
-    )
+    if (ARG_EXCLUDE_FROM_CHECK_ALL)
+      add_lit_testsuite(${target}
+        ${comment}
+        ${ARG_UNPARSED_ARGUMENTS}
+        EXCLUDE_FROM_CHECK_ALL
+        DEPENDS clang clang-resource-headers FileCheck ${ARG_DEPENDS}
+        ARGS ${ARG_ARGS}
+      )
+    else()
+      add_lit_testsuite(${target}
+        ${comment}
+        ${ARG_UNPARSED_ARGUMENTS}
+        DEPENDS clang clang-resource-headers FileCheck ${ARG_DEPENDS}
+        ARGS ${ARG_ARGS}
+      )
+    endif()
   endif()
 endfunction()
 


        


More information about the Openmp-commits mailing list