[PATCH] Part 1 of 2-part patch: Use a specified list of languages in cmake project() command.

Douglas Katzman dougk at google.com
Wed Jun 24 13:32:50 PDT 2015


Hi chapuni,

This is necessary to allow for explicit handling of '.S' files as distinct from '.c', which is necessary to allow different compilation options, which will eventually allow silencing some "-pedantic" warnings when compiling the assembly code of compiler-rt with gcc.

http://reviews.llvm.org/D10707

Files:
  CMakeLists.txt
  cmake/modules/HandleLLVMOptions.cmake

Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -26,7 +26,7 @@
   set(cmake_3_2_USES_TERMINAL USES_TERMINAL)
 endif()
 
-project(LLVM)
+project(LLVM C CXX ASM)
 
 # The following only works with the Ninja generator in CMake >= 3.0.
 set(LLVM_PARALLEL_COMPILE_JOBS "" CACHE STRING
Index: cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -166,6 +166,7 @@
     message(STATUS "Building with ${flag}")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}" PARENT_SCOPE)
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}" PARENT_SCOPE)
+    set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} ${flag}" PARENT_SCOPE)
   else()
     message(WARNING "${flag} is not supported.")
   endif()

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10707.28393.patch
Type: text/x-patch
Size: 896 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150624/3a10efcf/attachment.bin>


More information about the llvm-commits mailing list