[Openmp-commits] [PATCH] D112951: [OpenMP][libomp][CMake] set and use uppercase_CMAKE_BUILD_TYPE

Jonathan Peyton via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Nov 9 09:04:03 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG48b67dca2ccc: [OpenMP][libomp][CMake] use uppercase_CMAKE_BUILD_TYPE (authored by jlpeyton).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112951/new/

https://reviews.llvm.org/D112951

Files:
  openmp/runtime/CMakeLists.txt


Index: openmp/runtime/CMakeLists.txt
===================================================================
--- openmp/runtime/CMakeLists.txt
+++ openmp/runtime/CMakeLists.txt
@@ -34,6 +34,7 @@
   # Should assertions be enabled?  They are on by default.
   set(LIBOMP_ENABLE_ASSERTIONS TRUE CACHE BOOL
     "enable assertions?")
+  string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
 else() # Part of LLVM build
   # Determine the native architecture from LLVM.
   string(TOLOWER "${LLVM_TARGET_ARCH}" LIBOMP_NATIVE_ARCH)
@@ -189,14 +190,13 @@
 set(DEBUG_BUILD FALSE)
 set(RELWITHDEBINFO_BUILD FALSE)
 set(MINSIZEREL_BUILD FALSE)
-string(TOLOWER "${CMAKE_BUILD_TYPE}" libomp_build_type_lowercase)
-if("${libomp_build_type_lowercase}" STREQUAL "release")
+if("${uppercase_CMAKE_BUILD_TYPE}" STREQUAL "RELEASE")
   set(RELEASE_BUILD TRUE)
-elseif("${libomp_build_type_lowercase}" STREQUAL "debug")
+elseif("${uppercase_CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")
   set(DEBUG_BUILD TRUE)
-elseif("${libomp_build_type_lowercase}" STREQUAL "relwithdebinfo")
+elseif("${uppercase_CMAKE_BUILD_TYPE}" STREQUAL "RELWITHDEBINFO")
   set(RELWITHDEBINFO_BUILD TRUE)
-elseif("${libomp_build_type_lowercase}" STREQUAL "minsizerel")
+elseif("${uppercase_CMAKE_BUILD_TYPE}" STREQUAL "MINSIZEREL")
   set(MINSIZEREL_BUILD TRUE)
 endif()
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112951.385846.patch
Type: text/x-patch
Size: 1327 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20211109/da9bb067/attachment.bin>


More information about the Openmp-commits mailing list