[Openmp-commits] [openmp] 0e0483b - [OpenMP][CMake] Fix version detection of testing compiler

Jonas Hahnfeld via Openmp-commits openmp-commits at lists.llvm.org
Thu Jul 2 10:39:44 PDT 2020


Author: Jonas Hahnfeld
Date: 2020-07-02T19:39:30+02:00
New Revision: 0e0483bf5c383d5815b9f945fea7e347d4badc0e

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

LOG: [OpenMP][CMake] Fix version detection of testing compiler

When configuring in-tree, the correct names are LLVM_VERSION_MAJOR
and LLVM_VERSION_MINOR. This has been wrong since the code was added
in commits fc473dee98 and 821649229e.

Added: 
    

Modified: 
    openmp/cmake/OpenMPTesting.cmake

Removed: 
    


################################################################################
diff  --git a/openmp/cmake/OpenMPTesting.cmake b/openmp/cmake/OpenMPTesting.cmake
index f854e4ddc38d..90e0704c4a94 100644
--- a/openmp/cmake/OpenMPTesting.cmake
+++ b/openmp/cmake/OpenMPTesting.cmake
@@ -133,8 +133,8 @@ else()
   set(OPENMP_TEST_COMPILER_ID "Clang")
   # Cannot use CLANG_VERSION because we are not guaranteed that this is already set.
   set(OPENMP_TEST_COMPILER_VERSION "${LLVM_VERSION}")
-  set(OPENMP_TEST_COMPILER_VERSION_MAJOR "${LLVM_MAJOR_VERSION}")
-  set(OPENMP_TEST_COMPILER_VERSION_MAJOR_MINOR "${LLVM_MAJOR_VERSION}.${LLVM_MINOR_VERSION}")
+  set(OPENMP_TEST_COMPILER_VERSION_MAJOR "${LLVM_VERSION_MAJOR}")
+  set(OPENMP_TEST_COMPILER_VERSION_MAJOR_MINOR "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}")
   # Unfortunately the top-level cmake/config-ix.cmake file mangles CMake's
   # CMAKE_THREAD_LIBS_INIT variable from the FindThreads package, so work
   # around that, until it is fixed there.


        


More information about the Openmp-commits mailing list