Skip to content

Commit

Permalink
Use a specified list of languages in cmake project() command.
Browse files Browse the repository at this point in the history
This allows asm files and Cxx files to be compiled with different flags
rather than treating them identically. LLVM itself has no asm files
other than tests, but this setting is inherited by the compiler-rt
project (unless compiled standalone), which does have asm files.

Differential Revision: http://reviews.llvm.org/D10707

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243419 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
snuglas committed Jul 28, 2015
1 parent c26dfdf commit 8d1cf22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ else()
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
Expand Down
1 change: 1 addition & 0 deletions cmake/modules/HandleLLVMOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ function(add_flag_or_print_warning flag name)
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()
Expand Down

0 comments on commit 8d1cf22

Please sign in to comment.