[cmake] Fix libomptarget/test/CMakeLists.txt
authorAzharuddin Mohammed <azharudd@codeaurora.org>
Sun, 15 Jul 2018 17:29:43 +0000 (17:29 +0000)
committerAzharuddin Mohammed <azharudd@codeaurora.org>
Sun, 15 Jul 2018 17:29:43 +0000 (17:29 +0000)
Summary:
Should be variable name instead of variable reference. If the variable is
somehow unset, it messes up the if condition expression and causes a CMake
error.

Reviewers: jlpeyton, AndreyChurbanov, Hahnfeld

Reviewed By: Hahnfeld

Subscribers: mgorny, llvm-commits, openmp-commits

Differential Revision: https://reviews.llvm.org/D47221

llvm-svn: 337133

openmp/libomptarget/test/CMakeLists.txt

index 1662ff7..4e9c7ab 100644 (file)
@@ -1,6 +1,6 @@
 # CMakeLists.txt file for unit testing OpenMP offloading runtime library.
-if(NOT "${OPENMP_TEST_COMPILER_ID}" STREQUAL "Clang" OR
-   ${OPENMP_TEST_COMPILER_VERSION} VERSION_LESS 6.0.0)
+if(NOT OPENMP_TEST_COMPILER_ID STREQUAL "Clang" OR
+   OPENMP_TEST_COMPILER_VERSION VERSION_LESS 6.0.0)
   libomptarget_say("Can only test with Clang compiler in version 6.0.0 or later.")
   libomptarget_warning_say("The check-libomptarget target will not be available!")
   return()