Cleanup: quiet uninitialised variable warnings in CMake

This commit is contained in:
Campbell Barton 2025-01-06 17:56:21 +11:00
parent f581ff46a1
commit 77041084cd
2 changed files with 9 additions and 3 deletions

View File

@ -349,7 +349,7 @@ if(WITH_OPENCOLLADA)
set(PCRE_LIBRARIES ${LIBDIR}/opencollada/lib/libpcre.a) set(PCRE_LIBRARIES ${LIBDIR}/opencollada/lib/libpcre.a)
else() else()
# Quiet warnings. # Quiet warnings.
set(PCRE_LIBRARIES) set(PCRE_LIBRARIES "")
endif() endif()
else() else()
find_package_wrapper(PCRE) find_package_wrapper(PCRE)

View File

@ -437,7 +437,11 @@ set(LIB
# `Zstd` compressor for kernels. # `Zstd` compressor for kernels.
add_executable(zstd_compress ../cmake/zstd_compress.cpp) add_executable(zstd_compress ../cmake/zstd_compress.cpp)
target_include_directories(zstd_compress SYSTEM PRIVATE ${ZSTD_INCLUDE_DIRS}) target_include_directories(zstd_compress SYSTEM PRIVATE ${ZSTD_INCLUDE_DIRS})
target_link_libraries(zstd_compress ${ZSTD_LIBRARIES} ${PTHREADS_LIBRARIES})
target_link_libraries(zstd_compress ${ZSTD_LIBRARIES})
if(DEFINED PTHREADS_LIBRARIES)
target_link_libraries(zstd_compress ${PTHREADS_LIBRARIES})
endif()
if(NOT WITH_BLENDER) if(NOT WITH_BLENDER)
# For the Cycles standalone put libraries next to the Cycles application. # For the Cycles standalone put libraries next to the Cycles application.
@ -1340,7 +1344,9 @@ if(WITH_COMPILER_ASAN)
endif() endif()
endif() endif()
set_source_files_properties(device/cpu/kernel.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_KERNEL_FLAGS}") if(DEFINED CYCLES_KERNEL_FLAGS)
set_source_files_properties(device/cpu/kernel.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_KERNEL_FLAGS}")
endif()
if(CXX_HAS_SSE42) if(CXX_HAS_SSE42)
set_source_files_properties(device/cpu/kernel_sse42.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_SSE42_FLAGS}") set_source_files_properties(device/cpu/kernel_sse42.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_SSE42_FLAGS}")