From 2b49d36c081f4557cb17d176e17269c2c8843243 Mon Sep 17 00:00:00 2001 From: parabola94 Date: Thu, 3 Jul 2025 23:45:47 +0900 Subject: [PATCH] [flang][cmake] Separate FLANG_INCLUDE_TOOLS from FLANG_BUILD_TOOLS (#145005) If we disable `FLANG_BUILD_TOOLS`, not only building the tools but also generating the targets for them is skipped now. On the other hand, llvm separates them into `LLVM_BUILD_TOOLS` and `LLVM_INCLUDE_TOOLS`. This patch introduces `FLANG_INCLUDE_TOOLS` for the distinction. --- flang/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flang/CMakeLists.txt b/flang/CMakeLists.txt index 068d134671db..0bfada476348 100644 --- a/flang/CMakeLists.txt +++ b/flang/CMakeLists.txt @@ -504,9 +504,10 @@ add_subdirectory(include) add_subdirectory(lib) add_subdirectory(cmake/modules) +option(FLANG_INCLUDE_TOOLS "Generate build targets for the Flang tools." ON) option(FLANG_BUILD_TOOLS "Build the Flang tools. If OFF, just generate build targets." ON) -if (FLANG_BUILD_TOOLS) +if (FLANG_INCLUDE_TOOLS) add_subdirectory(tools) endif()