diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-02-08 06:33:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-02-08 07:08:31 +0300 |
commit | d989d8a37456da5b79b6c3a3d8278888e5f06ad0 (patch) | |
tree | 6bde8548cbc193bff9eac4d8b6f0f8a42533c445 /source/blender/makesrna/intern | |
parent | 9c9dab095d49d286887a5aa9df69f1a16570aaf1 (diff) |
CMake: only quiet warnings for generated rna files
also minor warning cleanup
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/CMakeLists.txt | 20 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sound_api.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_vfont_api.c | 2 |
3 files changed, 19 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 6df9e3c4e15..ec82fcafe76 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 @@ -128,6 +126,21 @@ set(APISRC 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 @@ -316,9 +329,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( diff --git a/source/blender/makesrna/intern/rna_sound_api.c b/source/blender/makesrna/intern/rna_sound_api.c index 07b65983b33..0164daa98d0 100644 --- a/source/blender/makesrna/intern/rna_sound_api.c +++ b/source/blender/makesrna/intern/rna_sound_api.c @@ -32,6 +32,8 @@ #include "RNA_define.h" #include "RNA_enum_types.h" +#include "rna_internal.h" + #ifdef RNA_RUNTIME #include "BKE_packedFile.h" diff --git a/source/blender/makesrna/intern/rna_vfont_api.c b/source/blender/makesrna/intern/rna_vfont_api.c index 6e6c08d5293..d92e75daf0a 100644 --- a/source/blender/makesrna/intern/rna_vfont_api.c +++ b/source/blender/makesrna/intern/rna_vfont_api.c @@ -32,6 +32,8 @@ #include "RNA_define.h" #include "RNA_enum_types.h" +#include "rna_internal.h" + #ifdef RNA_RUNTIME #include "BKE_packedFile.h" |