Skip to content

Commit 97a71ae

Browse files
committed
[flang][cmake] Set the default for FLANG_BUILD_NEW_DRIVER for oot builds
For out-of-tree builds of Flang, FLANG_BUILD_NEW_DRIVER is not inherited from llvm-project/llvm/CMakeLists.txt. Instead, a separate definition is required (but only for out-of-tree builds). Differential Revision: https://reviews.llvm.org/D102323
1 parent 00bfde7 commit 97a71ae

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

flang/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
2626
project(Flang)
2727
set(FLANG_STANDALONE_BUILD ON)
2828

29+
# For in-tree builds, this variable is inherited from
30+
# llvm-project/llvm/CMakeLists.txt. For out-of-tree builds, we need a
31+
# separate definition.
32+
option(FLANG_BUILD_NEW_DRIVER "Build the flang compiler driver" ON)
33+
2934
set(FLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
3035
if (NOT MSVC_IDE)
3136
set(LLVM_ENABLE_ASSERTIONS ${ENABLE_ASSERTIONS}

0 commit comments

Comments
 (0)