[CMake] Fixing passthrough for variables starting with the sub-project name
authorChris Bieneman <beanz@apple.com>
Wed, 11 Nov 2015 21:54:31 +0000 (21:54 +0000)
committerChris Bieneman <beanz@apple.com>
Wed, 11 Nov 2015 21:54:31 +0000 (21:54 +0000)
This allows TEST_SUITE variables to be passed from the top-level CMake into the external project.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252810 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/modules/LLVMExternalProjectUtils.cmake

index 5527769fc93fdc6405d43897cf170b1b7b6b2e8a..63178ce69066f56d7601fff966c57a384920f1d7 100644 (file)
@@ -92,7 +92,7 @@ function(llvm_ExternalProject_Add name source_dir)
   # them.
   get_cmake_property(variableNames VARIABLES)
   foreach(varaibleName ${variableNames})
   # them.
   get_cmake_property(variableNames VARIABLES)
   foreach(varaibleName ${variableNames})
-    if(${varaibleName} MATCHES "^${nameCanon}")
+    if(varaibleName MATCHES "^${nameCanon}")
       list(APPEND PASSTHROUGH_VARIABLES
         -D${varaibleName}=${${varaibleName}})
     endif()
       list(APPEND PASSTHROUGH_VARIABLES
         -D${varaibleName}=${${varaibleName}})
     endif()