[PATCH] D14339: AddLLVM: squelch CMP0007 by not adding empty elements to list

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 4 10:55:59 PST 2015


artagnon created this revision.
artagnon added reviewers: chapuni, beanz, rnk.
artagnon added a subscriber: llvm-commits.

When configuring various llvm projects that use AddLLVM.cmake, this warning is
emitted many times, flooding the screen:

Policy CMP0007 is not set: list command no longer ignores empty elements.

The fix is removing an extra semicolon.

http://reviews.llvm.org/D14339

Files:
  cmake/modules/AddLLVM.cmake

Index: cmake/modules/AddLLVM.cmake
===================================================================
--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -191,7 +191,7 @@
 # Note: Don't set variables CMAKE_*_OUTPUT_DIRECTORY any more,
 # or a certain builder, for eaxample, msbuild.exe, would be confused.
 function(set_output_directory target)
-  cmake_parse_arguments(ARG "" "BINARY_DIR;LIBRARY_DIR;" "" ${ARGN})
+  cmake_parse_arguments(ARG "" "BINARY_DIR;LIBRARY_DIR" "" ${ARGN})
 
   # module_dir -- corresponding to LIBRARY_OUTPUT_DIRECTORY.
   # It affects output of add_library(MODULE).
@@ -1048,7 +1048,7 @@
       break()
     endif()
   endforeach()
-  
+
   if(ARG_ALWAYS_GENERATE)
     set(component ${dest})
   else()
@@ -1112,4 +1112,3 @@
     endif()
   endif()
 endfunction()
-


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14339.39218.patch
Type: text/x-patch
Size: 811 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151104/d3daf1db/attachment.bin>


More information about the llvm-commits mailing list