diff --git a/build_files/build_environment/cmake/openimageio.cmake b/build_files/build_environment/cmake/openimageio.cmake index dddecc55f17..952fc0ed018 100644 --- a/build_files/build_environment/cmake/openimageio.cmake +++ b/build_files/build_environment/cmake/openimageio.cmake @@ -115,11 +115,11 @@ if(WIN32) # python interperter doesn't match the old one, overwriting our preference. # To side step this behavior we set PYBIND11_PYTHON_EXECUTABLE_LAST so it'll # leave the PYTHON_MODULE_EXTENSION value we set alone. - LIST(APPEND OPENIMAGEIO_EXTRA_ARGS -DPYBIND11_PYTHON_EXECUTABLE_LAST=${PYTHON_BINARY}) + list(APPEND OPENIMAGEIO_EXTRA_ARGS -DPYBIND11_PYTHON_EXECUTABLE_LAST=${PYTHON_BINARY}) if(BUILD_MODE STREQUAL Release) - LIST(APPEND OPENIMAGEIO_EXTRA_ARGS -DPYTHON_MODULE_EXTENSION=.pyd) + list(APPEND OPENIMAGEIO_EXTRA_ARGS -DPYTHON_MODULE_EXTENSION=.pyd) else() - LIST(APPEND OPENIMAGEIO_EXTRA_ARGS -DPYTHON_MODULE_EXTENSION=_d.pyd) + list(APPEND OPENIMAGEIO_EXTRA_ARGS -DPYTHON_MODULE_EXTENSION=_d.pyd) endif() endif() diff --git a/build_files/build_environment/cmake/options.cmake b/build_files/build_environment/cmake/options.cmake index 47bf54338fb..4c29e96a11c 100644 --- a/build_files/build_environment/cmake/options.cmake +++ b/build_files/build_environment/cmake/options.cmake @@ -54,12 +54,13 @@ if(WIN32) set(COMMON_DEFINES /DPSAPI_VERSION=2 /DTINYFORMAT_ALLOW_WCHAR_STRINGS) if(MSVC_VERSION GREATER 1909) - set(COMMON_MSVC_FLAGS "/Wv:18") #some deps with warnings as error aren't quite ready for dealing with the new 2017 warnings. + # Some deps with warnings as error aren't quite ready for dealing with the new 2017 warnings. + set(COMMON_MSVC_FLAGS "/Wv:18") endif() string(APPEND COMMON_MSVC_FLAGS " /bigobj") # To keep MSVC from oversubscribing the CPU, force it to single threaded mode # msbuild/ninja will queue as many compile units as there are cores, no need for - # msvc to be internally threading as well. + # MSVC to be internally threading as well. string(APPEND COMMON_MSVC_FLAGS " /cgthreads1 ") if(WITH_OPTIMIZED_DEBUG) diff --git a/build_files/build_environment/cmake/opus.cmake b/build_files/build_environment/cmake/opus.cmake index cf2cb85b9b8..16f8d159c2a 100644 --- a/build_files/build_environment/cmake/opus.cmake +++ b/build_files/build_environment/cmake/opus.cmake @@ -3,11 +3,11 @@ # SPDX-License-Identifier: GPL-2.0-or-later if(MSVC) - set(OPUS_CMAKE_ARGS + set(OPUS_CMAKE_ARGS -DPACKAGE_VERSION=${OPUS_VERSION} -DOPUS_BUILD_PROGRAMS=OFF -DOPUS_BUILD_TESTING=OFF - ) + ) endif() if(NOT WIN32) diff --git a/build_files/cmake/platform/platform_apple_xcode.cmake b/build_files/cmake/platform/platform_apple_xcode.cmake index 427b7b9447c..3b1688e0ba2 100644 --- a/build_files/cmake/platform/platform_apple_xcode.cmake +++ b/build_files/cmake/platform/platform_apple_xcode.cmake @@ -91,7 +91,7 @@ else() message(FATAL_ERROR "No Xcode or Command Line Tools detected") endif() - unset( _cltools_pkg_info) + unset(_cltools_pkg_info) unset(__cltools_pkg_info_result) endif() diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index 81e584d5629..1a49a4d5f63 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -190,7 +190,7 @@ endif() # X64 ASAN is available and usable on MSVC 16.9 preview 4 and up) if(WITH_COMPILER_ASAN AND MSVC AND NOT MSVC_CLANG) if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.28.29828) - #set a flag so we don't have to do this comparison all the time + # Set a flag so we don't have to do this comparison all the time. set(MSVC_ASAN ON) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fsanitize=address") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fsanitize=address") @@ -861,8 +861,8 @@ if(WITH_OPENIMAGEDENOISE) if(EXISTS ${OPENIMAGEDENOISE_LIBRARIES_RELEASE}) set(OPENIMAGEDENOISE_LIBRARIES ${OPENIMAGEDENOISE_LIBRARIES_RELEASE}) else() - set(WITH_OPENIMAGEDENOISE OFF) - message(STATUS "OpenImageDenoise not found, disabling WITH_OPENIMAGEDENOISE") + set(WITH_OPENIMAGEDENOISE OFF) + message(STATUS "OpenImageDenoise not found, disabling WITH_OPENIMAGEDENOISE") endif() endif() get_target_property(OPENIMAGEDENOISE_INCLUDE_DIRS OpenImageDenoise INTERFACE_INCLUDE_DIRECTORIES) diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt index f7bac39e430..c856b84f6d1 100644 --- a/intern/cycles/CMakeLists.txt +++ b/intern/cycles/CMakeLists.txt @@ -124,7 +124,7 @@ elseif(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) # Assume no signal trapping for better code generation. # We need to omit or modify specific flags to pass through clang-cl to prevent # unknown flag errors - if (WIN32 AND MSVC) + if(WIN32 AND MSVC) # Pass clang flags directly to clang otherwise. Clang-cl doesn't recognize # these flags by default set(CYCLES_KERNEL_FLAGS " /clang:-fno-trapping-math") @@ -132,7 +132,7 @@ elseif(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) string(APPEND CYCLES_KERNEL_FLAGS " /clang:-fno-math-errno") # Let compiler optimize 0.0 - x without worrying about signed zeros. string(APPEND CYCLES_KERNEL_FLAGS " /clang:-fno-signed-zeros") - else () + else() set(CYCLES_KERNEL_FLAGS " -fno-trapping-math") # Avoid overhead of setting errno for NaNs. string(APPEND CYCLES_KERNEL_FLAGS " -fno-math-errno") diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 745e221f19f..cfe820d6b22 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -90,7 +90,7 @@ if(WITH_OPENGL_BACKEND) endif() if(WITH_VULKAN_BACKEND) - if (WITH_VULKAN_MOLTENVK) + if(WITH_VULKAN_MOLTENVK) list(APPEND INC_SYS PUBLIC ${MOLTENVK_INCLUDE_DIRS} ) diff --git a/intern/locale/CMakeLists.txt b/intern/locale/CMakeLists.txt index 27137551823..06587b36218 100644 --- a/intern/locale/CMakeLists.txt +++ b/intern/locale/CMakeLists.txt @@ -22,7 +22,7 @@ if(WIN32) # This is set in platform_win32.cmake, will exist for 3.4+ library # folders which are dynamic, but not for 3.3 which will be static. if(EXISTS ${BOOST_34_TRIGGER_FILE}) - add_definitions (-DBOOST_ALL_DYN_LINK=1) + add_definitions(-DBOOST_ALL_DYN_LINK=1) endif() endif() diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt index b5c320f8fcc..ed3835a936d 100644 --- a/source/blender/blenlib/CMakeLists.txt +++ b/source/blender/blenlib/CMakeLists.txt @@ -454,7 +454,7 @@ if(WITH_FFTW3) ${FFTW3_LIBRARIES} ) add_definitions(-DWITH_FFTW3) - if (WITH_FFTW3_THREADS_F_SUPPORT) + if(WITH_FFTW3_THREADS_F_SUPPORT) add_definitions(-DWITH_FFTW3_THREADS_F_SUPPORT) endif() endif() diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 787f0673a9b..95a1aa2f73d 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -352,7 +352,7 @@ else() ${CMAKE_BINARY_DIR}/blender.exe.manifest ) endif() - target_compile_definitions (blender-launcher PRIVATE -D_UNICODE -DUNICODE) + target_compile_definitions(blender-launcher PRIVATE -D_UNICODE -DUNICODE) target_link_libraries(blender-launcher Pathcch.lib) endif() endif() @@ -986,7 +986,7 @@ elseif(WIN32) ALL ) - if(WITH_VULKAN_BACKEND) + if(WITH_VULKAN_BACKEND) windows_install_shared_manifest( FILES ${LIBDIR}/vulkan/bin/vulkan-1.dll ALL diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt index 7357edb1e52..5503846007c 100644 --- a/tests/python/CMakeLists.txt +++ b/tests/python/CMakeLists.txt @@ -675,9 +675,9 @@ if(WITH_CYCLES OR WITH_GPU_RENDER_TESTS) endif() # Disabled until new OpenPGL version with deterministic results. - #if(WITH_CYCLES_PATH_GUIDING) - # list(APPEND render_tests guiding) - #endif() + # if(WITH_CYCLES_PATH_GUIDING) + # list(APPEND render_tests guiding) + # endif() if(WITH_GPU_RENDER_TESTS) list(APPEND render_tests grease_pencil) @@ -700,7 +700,7 @@ if(WITH_CYCLES OR WITH_GPU_RENDER_TESTS) foreach(render_test ${_cycles_render_tests}) set(_cycles_test_name "cycles_${render_test}_${_cycles_device_lower}") - if (NOT(WITH_CYCLES_TEST_OSL AND WITH_CYCLES_OSL AND ("${render_test}" STREQUAL "osl"))) + if(NOT(WITH_CYCLES_TEST_OSL AND WITH_CYCLES_OSL AND ("${render_test}" STREQUAL "osl"))) # Only run OSL basic tests during this phase if WITH_CYCLES_TEST_OSL isn't enabled add_render_test( ${_cycles_test_name} @@ -715,7 +715,7 @@ if(WITH_CYCLES OR WITH_GPU_RENDER_TESTS) endif() endif() - if (WITH_CYCLES_TEST_OSL AND WITH_CYCLES_OSL) + if(WITH_CYCLES_TEST_OSL AND WITH_CYCLES_OSL) # OSL is only supported with CPU and OptiX # TODO: Enable OptiX support once it's more stable if("${_cycles_device_lower}" STREQUAL "cpu")