Skip to content

Commit 77175d7

Browse files
dbortfacebook-github-bot
authored andcommitted
Rename private CMakeLists.txt vars
Summary: Private vars should conform to `_[a-z0-9_]+`, and public vars should conform to `EXECUTORCH_[A-Z0-9_]+`. After this change, the only public var is `EXECUTORCH_SRCS_FILE`. Reviewed By: larryliu0820 Differential Revision: D48071640 fbshipit-source-id: 830f16fc1824bd4c26ed736210250b7339887fa2
1 parent 58b664f commit 77175d7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ if(NOT BUCK2)
5252
endif()
5353

5454
# TODO(dbort): Fix these warnings and remove this flag.
55-
set(COMMON_COMPILE_OPTIONS -Wno-deprecated-declarations)
55+
set(_common_compile_options -Wno-deprecated-declarations)
5656

5757
# Let files say "include <executorch/path/to/header.h>".
58-
set(COMMON_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/..)
58+
set(_common_include_directories ${CMAKE_CURRENT_SOURCE_DIR}/..)
5959

6060
#
6161
# The `_<target>_srcs` lists are defined by including ${EXECUTORCH_SRCS_FILE}.
@@ -150,8 +150,8 @@ target_include_directories(
150150
add_library(executorch ${_executorch__srcs})
151151
target_link_libraries(executorch PRIVATE program_schema)
152152
target_link_libraries(executorch PRIVATE dl) # For dladdr()
153-
target_include_directories(executorch PUBLIC ${COMMON_INCLUDE_DIRECTORIES})
154-
target_compile_options(executorch PUBLIC ${COMMON_COMPILE_OPTIONS})
153+
target_include_directories(executorch PUBLIC ${_common_include_directories})
154+
target_compile_options(executorch PUBLIC ${_common_compile_options})
155155

156156
#
157157
# portable_kernels: Pure-C++ kernel library for ATen ops
@@ -161,7 +161,7 @@ target_compile_options(executorch PUBLIC ${COMMON_COMPILE_OPTIONS})
161161

162162
add_library(portable_kernels ${_portable_kernels__srcs})
163163
target_link_libraries(portable_kernels PRIVATE executorch)
164-
target_compile_options(portable_kernels PUBLIC ${COMMON_COMPILE_OPTIONS})
164+
target_compile_options(portable_kernels PUBLIC ${_common_compile_options})
165165

166166
#
167167
# portable_kernels_bindings: Bindings and registration for all ops defined in
@@ -265,4 +265,4 @@ endif()
265265
add_executable(executor_runner ${_executor_runner__srcs})
266266
target_link_libraries(executor_runner executorch portable_kernels_bindings
267267
gflags)
268-
target_compile_options(executor_runner PUBLIC ${COMMON_COMPILE_OPTIONS})
268+
target_compile_options(executor_runner PUBLIC ${_common_compile_options})

0 commit comments

Comments
 (0)