Skip to content

Commit 9d1e59c

Browse files
cblichmanncopybara-github
authored andcommitted
Remove SAPI_ENABLE_CLANG_TOOL option
The Clang tool header generator is now always used by default, and the Python3 fallback for header generation has been removed. PiperOrigin-RevId: 907599771 Change-Id: I7dfa69499f09ca1432c1119d02b068404a1694f6
1 parent e4c2fe4 commit 9d1e59c

3 files changed

Lines changed: 6 additions & 14 deletions

File tree

cmake/SapiDeps.cmake

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,11 @@ endif()
100100

101101
find_package(Threads REQUIRED)
102102

103-
if(SAPI_ENABLE_CLANG_TOOL)
104-
# If unset (the default), CMake will build the tool first and add it as a
105-
# dependency.
106-
set(SAPI_CLANG_TOOL_EXECUTABLE "" CACHE FILEPATH
107-
"Path to the Clang tool based header generator"
108-
)
109-
else()
110-
# Find Python 3 and add its location to the cache so that its available in
111-
# the add_sapi_library() macro in embedding projects.
112-
find_package(Python3 COMPONENTS Interpreter REQUIRED)
113-
set(SAPI_PYTHON3_EXECUTABLE "${Python3_EXECUTABLE}" CACHE INTERNAL "" FORCE)
114-
endif()
103+
# If unset (the default), CMake will build the tool first and add it as a
104+
# dependency.
105+
set(SAPI_CLANG_TOOL_EXECUTABLE "" CACHE FILEPATH
106+
"Path to the Clang tool based header generator"
107+
)
115108

116109
# Undo global changes
117110
if(_sapi_saved_BUILD_TESTING)

cmake/SapiOptions.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ option(SAPI_BUILD_TESTING
5252
# Disabled by default, as this will download a lot of extra content.
5353
option(SAPI_CONTRIB_BUILD_TESTING "Build tests for sandboxes in 'contrib'" OFF)
5454

55-
option(SAPI_ENABLE_CLANG_TOOL "Use the Clang tool header generator" ON)
5655
option(SAPI_ENABLE_CLANG_TOOL_STATIC
5756
"Link the Clang libraries statically into the tool" OFF
5857
)

sandboxed_api/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ add_subdirectory(tools/filewrapper)
1616
add_subdirectory(sandbox2)
1717
add_subdirectory(tests)
1818
add_subdirectory(util)
19-
if(SAPI_ENABLE_CLANG_TOOL AND NOT SAPI_CLANG_TOOL_EXECUTABLE)
19+
if(NOT SAPI_CLANG_TOOL_EXECUTABLE)
2020
add_subdirectory(tools/clang_generator)
2121
endif()
2222
add_subdirectory(examples)

0 commit comments

Comments
 (0)