File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,19 @@ endif()
5353if (NOT CMAKE_BUILD_TYPE )
5454 set (CMAKE_BUILD_TYPE Debug)
5555endif ()
56+
57+ # https://cmake.org/cmake/help/latest/command/add_definitions.html
58+ # Adds definitions to the compiler command line for
59+ # - targets in the current directory, before and after this command is invoked
60+ # - targets in sub-directories added after this command is invoked
61+ if (CMAKE_BUILD_TYPE STREQUAL "Release" )
62+ # Avoid pulling in the logging strings, which can be large.
63+ add_definitions (-DET_LOG_ENABLED=0)
64+ # Avoid pulling in the flatbuffer data verification
65+ # logic, which can add about 20kB.
66+ add_definitions (-DET_ENABLE_PROGRAM_VERIFICATION=0)
67+ endif ()
68+
5669# -Os: Optimize for size. -ffunction-sections -fdata-sections: breaks function
5770# and data into sections so they can be properly gc'd. -s: strip symbols
5871set (CMAKE_CXX_FLAGS_RELEASE
You can’t perform that action at this time.
0 commit comments