Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ tests/monsterdata_javascript_wire.mon
tests/monsterdata_lobster_wire.mon
tests/monsterdata_rust_wire.mon
tests/php/
tests/ts/preserve_case/
tests/java_preserve_case_*/
CMakeLists.txt.user
CMakeScripts/**
CTestTestfile.cmake
Expand Down Expand Up @@ -156,4 +158,3 @@ kotlin/**/generated
MODULE.bazel.lock

# Ignore the generated docs
docs/site
3 changes: 3 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,16 @@ filegroup(
"include/flatbuffers/detached_buffer.h",
"include/flatbuffers/file_manager.h",
"include/flatbuffers/flatbuffer_builder.h",
"include/flatbuffers/flatc.h",
"include/flatbuffers/flatbuffers.h",
"include/flatbuffers/flex_flat_util.h",
"include/flatbuffers/flexbuffers.h",
"include/flatbuffers/grpc.h",
"include/flatbuffers/hash.h",
"include/flatbuffers/idl.h",
"include/flatbuffers/idlnames.h",
"include/flatbuffers/minireflect.h",
"include/flatbuffers/options.h",
"include/flatbuffers/reflection.h",
"include/flatbuffers/reflection_generated.h",
"include/flatbuffers/registry.h",
Expand Down
12 changes: 11 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ endif()
add_definitions(-DFLATBUFFERS_LOCALE_INDEPENDENT=$<BOOL:${FLATBUFFERS_LOCALE_INDEPENDENT}>)

if(NOT WIN32)
include(CheckSymbolExists)
check_symbol_exists(realpath "stdlib.h" HAVE_REALPATH)
if(NOT HAVE_REALPATH)
add_definitions(-DFLATBUFFERS_NO_ABSOLUTE_PATH_RESOLUTION)
Expand All @@ -136,6 +135,7 @@ set(FlatBuffers_Library_SRCS
include/flatbuffers/hash.h
include/flatbuffers/idl.h
include/flatbuffers/minireflect.h
include/flatbuffers/options.h
include/flatbuffers/reflection.h
include/flatbuffers/reflection_generated.h
include/flatbuffers/registry.h
Expand All @@ -151,6 +151,7 @@ set(FlatBuffers_Library_SRCS
src/idl_gen_text.cpp
src/reflection.cpp
src/util.cpp
src/options.cpp
)

set(FlatBuffers_Compiler_SRCS
Expand Down Expand Up @@ -449,26 +450,35 @@ if(FLATBUFFERS_BUILD_FLATLIB)
endif()
endif()

option(ENABLE_DEBUG_SYMBOLS "Enable debug symbols for flatc" OFF)

if(FLATBUFFERS_BUILD_FLATC)
add_executable(flatc ${FlatBuffers_Compiler_SRCS})

if(FLATBUFFERS_ENABLE_PCH)
add_pch_to_target(flatc include/flatbuffers/pch/flatc_pch.h)
endif()

target_link_libraries(flatc PRIVATE $<BUILD_INTERFACE:ProjectConfig>)

target_compile_options(flatc
PRIVATE
$<$<AND:$<BOOL:${MSVC_LIKE}>,$<CONFIG:Release>>:
/MT
>
$<$<BOOL:${ENABLE_DEBUG_SYMBOLS}>:
-g -O0
>
)

if(FLATBUFFERS_CODE_SANITIZE AND NOT WIN32)
add_fsanitize_to_target(flatc ${FLATBUFFERS_CODE_SANITIZE})
endif()

if(NOT FLATBUFFERS_FLATC_EXECUTABLE)
set(FLATBUFFERS_FLATC_EXECUTABLE $<TARGET_FILE:flatc>)
endif()

if(FLATBUFFERS_STATIC_FLATC AND NOT MSVC)
target_link_libraries(flatc PRIVATE -static)
endif()
Expand Down
1 change: 1 addition & 0 deletions dart/test_preserve_case/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*_generated.dart
10 changes: 10 additions & 0 deletions dart/test_preserve_case/bool_structs.fbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Test for #7355
table Foo {
my_foo : foo_properties;
}

struct foo_properties
{
a : bool;
b : bool;
}
10 changes: 10 additions & 0 deletions dart/test_preserve_case/enums.fbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
enum OptionsEnum : uint32
{
A = 1,
B = 2,
C = 3
}

table MyTable {
options : [OptionsEnum];
}
Loading
Loading