[PATCH] D133482: [LLVM] Fix GetErrcMessages.cmake module for WoA

Muhammad Omair Javaid via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 12 05:01:07 PDT 2022


omjavaid updated this revision to Diff 459425.
omjavaid added a comment.

This update moves configuration of CMAKE_TRY_COMPILE_CONFIGURATION
to the top-level CMakeLists.txt file. Also setting is done based
on CMAKE_CONFIGURATION_TYPES or CMAKE_BUILD_TYPE unless there is
no CMAKE_DEFAULT_BUILD_TYPE already configured by user.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133482

Files:
  llvm/CMakeLists.txt


Index: llvm/CMakeLists.txt
===================================================================
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -105,6 +105,17 @@
 ")
 endif()
 
+# Set default build type for cmake's try_compile module.
+if(CMAKE_DEFAULT_BUILD_TYPE)
+  set(CMAKE_TRY_COMPILE_CONFIGURATION ${CMAKE_DEFAULT_BUILD_TYPE})
+else()
+  if(CMAKE_CONFIGURATION_TYPES)
+    list(GET CMAKE_CONFIGURATION_TYPES 0 CMAKE_TRY_COMPILE_CONFIGURATION)
+  elseif(CMAKE_BUILD_TYPE)
+    set(CMAKE_TRY_COMPILE_CONFIGURATION ${CMAKE_BUILD_TYPE})
+  endif()
+endif()
+
 # Side-by-side subprojects layout: automatically set the
 # LLVM_EXTERNAL_${project}_SOURCE_DIR using LLVM_ALL_PROJECTS
 # This allows an easy way of setting up a build directory for llvm and another


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133482.459425.patch
Type: text/x-patch
Size: 764 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220912/f0c7fd92/attachment.bin>


More information about the llvm-commits mailing list