datatoc: exclude the initial C-style comment from GLSL/MSL/Cuda files
Add optional argument `STRIP_LEADING_C_COMMENTS` to CMake macros: data_to_c_simple & data_to_c. Strip leading C-style comments that don't bloat binary size. Comments are replaced with blank lines so line numbers in error messages match. Reduces Blender's binary size by ~70kb.
This commit is contained in:
@@ -87,7 +87,11 @@ if(WITH_OPENSUBDIV)
|
||||
add_definitions(-D_USE_MATH_DEFINES)
|
||||
endif()
|
||||
|
||||
data_to_c_simple(internal/evaluator/shaders/glsl_compute_kernel.glsl SRC)
|
||||
data_to_c_simple(
|
||||
internal/evaluator/shaders/glsl_compute_kernel.glsl
|
||||
SRC
|
||||
STRIP_LEADING_C_COMMENTS
|
||||
)
|
||||
else()
|
||||
list(APPEND SRC
|
||||
stub/opensubdiv_stub.cc
|
||||
|
||||
Reference in New Issue
Block a user