mirror of
https://projects.blender.org/blender/blender.git
synced 2025-01-22 15:32:15 -05:00
Cleanup: quiet uninitialized warnings
This commit is contained in:
parent
42713bf0f8
commit
ed01e16aa6
10 changed files with 32 additions and 7 deletions
|
@ -1755,6 +1755,8 @@ endif()
|
|||
|
||||
if(WITH_COMPILER_SHORT_FILE_MACRO)
|
||||
# Use '-fmacro-prefix-map' for Clang and GCC (MSVC doesn't support this).
|
||||
set(C_PREFIX_MAP_FLAGS "")
|
||||
set(CXX_PREFIX_MAP_FLAGS "")
|
||||
add_check_c_compiler_flag(C_PREFIX_MAP_FLAGS C_MACRO_PREFIX_MAP -fmacro-prefix-map=foo=bar)
|
||||
add_check_cxx_compiler_flag(CXX_PREFIX_MAP_FLAGS CXX_MACRO_PREFIX_MAP -fmacro-prefix-map=foo=bar)
|
||||
if(C_MACRO_PREFIX_MAP AND CXX_MACRO_PREFIX_MAP)
|
||||
|
@ -1789,6 +1791,8 @@ if(WITH_COMPILER_SHORT_FILE_MACRO)
|
|||
)
|
||||
set(WITH_COMPILER_SHORT_FILE_MACRO OFF)
|
||||
endif()
|
||||
unset(C_PREFIX_MAP_FLAGS)
|
||||
unset(CXX_PREFIX_MAP_FLAGS)
|
||||
endif()
|
||||
|
||||
# Include warnings first, so its possible to disable them with user defined flags
|
||||
|
|
|
@ -39,6 +39,8 @@ macro(BLENDER_SRC_GTEST_EX)
|
|||
unset(_current_include_directories)
|
||||
if(WIN32)
|
||||
set(MANIFEST "${CMAKE_BINARY_DIR}/tests.exe.manifest")
|
||||
else()
|
||||
set(MANIFEST "")
|
||||
endif()
|
||||
|
||||
add_executable(${TARGET_NAME} ${ARG_SRC} ${MANIFEST})
|
||||
|
@ -63,10 +65,13 @@ macro(BLENDER_SRC_GTEST_EX)
|
|||
bf_intern_guardedalloc
|
||||
extern_gtest
|
||||
extern_gmock
|
||||
# needed for glog
|
||||
${PTHREADS_LIBRARIES}
|
||||
# Needed for GLOG.
|
||||
${GLOG_LIBRARIES}
|
||||
${GFLAGS_LIBRARIES})
|
||||
|
||||
if(DEFINED PTHREADS_LIBRARIES) # Needed for GLOG.
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE ${PTHREADS_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_OPENMP_STATIC)
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE ${OpenMP_LIBRARIES})
|
||||
endif()
|
||||
|
@ -102,8 +107,8 @@ macro(BLENDER_SRC_GTEST_EX)
|
|||
endif()
|
||||
if(WIN32)
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES VS_GLOBAL_VcpkgEnabled "false")
|
||||
unset(MANIFEST)
|
||||
endif()
|
||||
unset(MANIFEST)
|
||||
unset(TEST_INC)
|
||||
unset(TEST_INC_SYS)
|
||||
unset(TARGET_NAME)
|
||||
|
|
|
@ -8,6 +8,8 @@ set(INC
|
|||
|
||||
set(INC_SYS
|
||||
)
|
||||
set(LIB
|
||||
)
|
||||
|
||||
add_library(bf_intern_atomic INTERFACE)
|
||||
|
||||
|
|
|
@ -49,8 +49,10 @@ if(WIN32 AND NOT UNIX)
|
|||
endif()
|
||||
|
||||
# Jemalloc 5.0.0+ needs extra configuration.
|
||||
if(WITH_MEM_JEMALLOC AND NOT ("${JEMALLOC_VERSION}" VERSION_LESS "5.0.0"))
|
||||
add_definitions(-DWITH_JEMALLOC_CONF)
|
||||
if(WITH_MEM_JEMALLOC)
|
||||
if(NOT ("${JEMALLOC_VERSION}" VERSION_LESS "5.0.0"))
|
||||
add_definitions(-DWITH_JEMALLOC_CONF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
blender_add_lib(bf_intern_guardedalloc "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||
|
|
|
@ -49,6 +49,8 @@ set(LIB
|
|||
blender_add_lib(bf_asset_system "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||
|
||||
if(WITH_GTESTS)
|
||||
set(TEST_INC
|
||||
)
|
||||
set(TEST_SRC
|
||||
tests/asset_catalog_path_test.cc
|
||||
tests/asset_catalog_test.cc
|
||||
|
|
|
@ -18,7 +18,6 @@ set(INC_SYS
|
|||
${EIGEN3_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIRS}
|
||||
${ZSTD_INCLUDE_DIRS}
|
||||
${GMP_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(SRC
|
||||
|
|
|
@ -171,6 +171,8 @@ blender_add_lib(bf_depsgraph "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
|||
add_dependencies(bf_depsgraph bf_rna)
|
||||
|
||||
if(WITH_GTESTS)
|
||||
set(TEST_INC
|
||||
)
|
||||
set(TEST_SRC
|
||||
intern/builder/deg_builder_rna_test.cc
|
||||
)
|
||||
|
|
|
@ -71,6 +71,8 @@ endif()
|
|||
blender_add_lib(bf_functions "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||
|
||||
if(WITH_GTESTS)
|
||||
set(TEST_INC
|
||||
)
|
||||
set(TEST_SRC
|
||||
tests/FN_field_test.cc
|
||||
tests/FN_lazy_function_test.cc
|
||||
|
|
|
@ -24,12 +24,17 @@ set(SRC
|
|||
|
||||
set(LIB
|
||||
${OPENIMAGEIO_LIBRARIES}
|
||||
${PUGIXML_LIBRARIES}
|
||||
PRIVATE bf::blenlib
|
||||
PRIVATE bf::dna
|
||||
PRIVATE bf::intern::guardedalloc
|
||||
)
|
||||
|
||||
if(WITH_PUGIXML)
|
||||
list(APPEND LIB
|
||||
${PUGIXML_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
list(APPEND INC_SYS
|
||||
${OPENEXR_INCLUDE_DIRS}
|
||||
|
|
|
@ -29,6 +29,8 @@ set(INC
|
|||
# RNA_prototypes.h
|
||||
${CMAKE_BINARY_DIR}/source/blender/makesrna
|
||||
)
|
||||
set(INC_SYS
|
||||
)
|
||||
|
||||
set(SRC
|
||||
intern/wm.cc
|
||||
|
|
Loading…
Reference in a new issue