Skip to content

Commit 416d114

Browse files
larryliu0820facebook-github-bot
authored andcommitted
Fix minor CMake issue
Summary: For CMake version < 3.19 we can't do `add_library(<name> INTERFACE <sources>)`. See https://cmake.org/cmake/help/v3.19/command/add_library.html#interface-libraries Since the minimum requirement is 3.13 we better make it work for < 3.19. Reviewed By: dbort Differential Revision: D48084620 fbshipit-source-id: 262b8d7d0f6e5cef821bbeebc76f8d964a1de59d
1 parent ed1e3b4 commit 416d114

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ add_custom_command(
134134
DEPENDS flatc ${_program_schema__srcs}
135135
COMMENT "Generating program_schema headers"
136136
VERBATIM)
137-
add_library(program_schema INTERFACE ${_program_schema__outputs})
137+
138+
add_library(program_schema ${_program_schema__outputs})
139+
set_target_properties(program_schema PROPERTIES LINKER_LANGUAGE CXX)
138140
target_include_directories(
139141
program_schema
140142
INTERFACE ${_program_schema__include_dir}

0 commit comments

Comments
 (0)