[PATCH] D71737: [CMake][runtimes] Skip the generic target variable if named matches

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 19 17:24:45 PST 2019


phosek updated this revision to Diff 234813.

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

https://reviews.llvm.org/D71737

Files:
  llvm/runtimes/CMakeLists.txt


Index: llvm/runtimes/CMakeLists.txt
===================================================================
--- llvm/runtimes/CMakeLists.txt
+++ llvm/runtimes/CMakeLists.txt
@@ -452,11 +452,12 @@
       if("${out}" EQUAL 0)
         string(REPLACE "RUNTIMES_${name}_" "" new_name ${variableName})
         list(APPEND ${name}_extra_args "-D${new_name}=${${variableName}}")
-      endif()
-      string(FIND "${variableName}" "RUNTIMES_${target}_" out)
-      if("${out}" EQUAL 0)
-        string(REPLACE "RUNTIMES_${target}_" "" new_name ${variableName})
-        list(APPEND ${name}_extra_args "-D${new_name}=${${variableName}}")
+      else()
+        string(FIND "${variableName}" "RUNTIMES_${target}_" out)
+        if("${out}" EQUAL 0)
+          string(REPLACE "RUNTIMES_${target}_" "" new_name ${variableName})
+          list(APPEND ${name}_extra_args "-D${new_name}=${${variableName}}")
+        endif()
       endif()
     endforeach()
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71737.234813.patch
Type: text/x-patch
Size: 944 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191220/a1e54a3a/attachment.bin>


More information about the llvm-commits mailing list