diff options
Diffstat (limited to 'source/blender/makesrna/intern/CMakeLists.txt')
-rw-r--r-- | source/blender/makesrna/intern/CMakeLists.txt | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index c6c5b54f989..0515a6fc054 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -28,8 +28,6 @@ if(CMAKE_COMPILER_IS_GNUCC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=implicit-function-declaration") endif() -# message(STATUS "Configuring makesrna") - # files rna_access.c rna_define.c makesrna.c intentionally excluded. set(DEFSRC rna_ID.c @@ -118,15 +116,32 @@ set(APISRC rna_scene_api.c rna_sensor_api.c rna_sequencer_api.c + rna_sound_api.c rna_space_api.c rna_text_api.c rna_ui_api.c + rna_vfont_api.c rna_wm_api.c ) string(REGEX REPLACE "rna_([a-zA-Z0-9_-]*).c" "${CMAKE_CURRENT_BINARY_DIR}/rna_\\1_gen.c" GENSRC "${DEFSRC}") set_source_files_properties(${GENSRC} PROPERTIES GENERATED TRUE) +# -------------------------- +# CFLAGS for Generated Files +# +# less strict flags for generated source +set(GENSRC_CFLAGS) +if(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_C_COMPILER_ID MATCHES "Clang")) + set(GENSRC_CFLAGS "-Wno-missing-prototypes") +endif() + +if(GENSRC_CFLAGS) + set_source_files_properties(${GENSRC} PROPERTIES COMPILE_FLAGS "${GENSRC_CFLAGS}") +endif() +unset(GENSRC_CFLAGS) + + set(SRC_RNA_INC ../RNA_access.h ../RNA_define.h @@ -298,6 +313,7 @@ blender_include_dirs( ../../ikplugin ../../makesdna ../../nodes/ + ../../physics ../../pointcache/ ../../windowmanager ../../editors/include @@ -319,9 +335,6 @@ add_executable(makesrna ${SRC} ${SRC_RNA_INC} ${SRC_DNA_INC}) target_link_libraries(makesrna bf_dna) target_link_libraries(makesrna bf_dna_blenlib) -# too many warnings with clang -remove_cc_flag("-Wmissing-prototypes") - # Output rna_*_gen.c # note (linux only): with crashes try add this after COMMAND: valgrind --leak-check=full --track-origins=yes add_custom_command( |