[Bf-blender-cvs] [a5c984a57d5] master: Cleanup: cmake indentation

Campbell Barton noreply at git.blender.org
Wed Mar 4 01:09:42 CET 2020


Commit: a5c984a57d5fef45677876af15bff39632e5f552
Author: Campbell Barton
Date:   Wed Mar 4 10:47:24 2020 +1100
Branches: master
https://developer.blender.org/rBa5c984a57d5fef45677876af15bff39632e5f552

Cleanup: cmake indentation

===================================================================

M	build_files/cmake/macros.cmake
M	build_files/cmake/platform/platform_apple.cmake
M	build_files/cmake/platform/platform_win32.cmake
M	intern/cycles/app/CMakeLists.txt
M	intern/cycles/test/CMakeLists.txt
M	intern/quadriflow/CMakeLists.txt
M	source/blender/collada/CMakeLists.txt
M	source/blender/compositor/CMakeLists.txt
M	tests/gtests/blenloader/CMakeLists.txt

===================================================================

diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index cb45d30c664..6287da55580 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -947,7 +947,7 @@ function(data_to_c_simple
   set_source_files_properties(${_file_to} PROPERTIES GENERATED TRUE)
 endfunction()
 
-# macro for converting pixmap directory to a png and then a c file
+# Function for converting pixmap directory to a '.png' and then a '.c' file.
 function(data_to_c_simple_icons
   path_from icon_prefix icon_names
   list_to_add
@@ -1160,12 +1160,12 @@ macro(blender_precompile_headers target cpp header)
 endmacro()
 
 macro(set_and_warn_dependency
-    _dependency _setting _val)
-    # when $_dependency is disabled, forces $_setting = $_val
-    if(NOT ${${_dependency}} AND ${${_setting}})
-      message(STATUS "'${_dependency}' is disabled: forcing 'set(${_setting} ${_val})'")
-      set(${_setting} ${_val})
-    endif()
+  _dependency _setting _val)
+  # when $_dependency is disabled, forces $_setting = $_val
+  if(NOT ${${_dependency}} AND ${${_setting}})
+    message(STATUS "'${_dependency}' is disabled: forcing 'set(${_setting} ${_val})'")
+    set(${_setting} ${_val})
+  endif()
 endmacro()
 
 macro(without_system_libs_begin)
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake
index e997f105324..123eb3ef7a0 100644
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@ -411,11 +411,13 @@ if(WITH_OPENMP)
 
     # Copy libomp.dylib to allow executables like datatoc and tests to work.
     execute_process(
-        COMMAND mkdir -p ${CMAKE_BINARY_DIR}/Resources/lib
-        COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/Resources/lib/libomp.dylib)
+      COMMAND mkdir -p ${CMAKE_BINARY_DIR}/Resources/lib
+      COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/Resources/lib/libomp.dylib
+    )
     execute_process(
-        COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin/Resources/lib
-        COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/bin/Resources/lib/libomp.dylib)
+      COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin/Resources/lib
+      COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/bin/Resources/lib/libomp.dylib
+    )
   endif()
 endif()
 
diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake
index c3d00d25425..7ba7e3999e4 100644
--- a/build_files/cmake/platform/platform_win32.cmake
+++ b/build_files/cmake/platform/platform_win32.cmake
@@ -671,8 +671,8 @@ if(WITH_USD)
     set(USD_DEBUG_LIB ${LIBDIR}/usd/lib/libusd_m_d.lib)
     set(USD_LIBRARY_DIR ${LIBDIR}/usd/lib/usd)
     set(USD_LIBRARIES
-        debug ${USD_DEBUG_LIB}
-        optimized ${USD_RELEASE_LIB}
+      debug ${USD_DEBUG_LIB}
+      optimized ${USD_RELEASE_LIB}
     )
   endif()
 endif()
diff --git a/intern/cycles/app/CMakeLists.txt b/intern/cycles/app/CMakeLists.txt
index d67a72ab7db..199ab8ce316 100644
--- a/intern/cycles/app/CMakeLists.txt
+++ b/intern/cycles/app/CMakeLists.txt
@@ -51,14 +51,16 @@ endif()
 
 # Common configuration.
 
-link_directories(${OPENIMAGEIO_LIBPATH}
-                 ${BOOST_LIBPATH}
-                 ${PNG_LIBPATH}
-                 ${JPEG_LIBPATH}
-                 ${ZLIB_LIBPATH}
-                 ${TIFF_LIBPATH}
-                 ${OPENEXR_LIBPATH}
-                 ${OPENJPEG_LIBPATH})
+link_directories(
+  ${OPENIMAGEIO_LIBPATH}
+  ${BOOST_LIBPATH}
+  ${PNG_LIBPATH}
+  ${JPEG_LIBPATH}
+  ${ZLIB_LIBPATH}
+  ${TIFF_LIBPATH}
+  ${OPENEXR_LIBPATH}
+  ${OPENJPEG_LIBPATH}
+)
 
 if(WITH_OPENCOLORIO)
   link_directories(${OPENCOLORIO_LIBPATH})
diff --git a/intern/cycles/test/CMakeLists.txt b/intern/cycles/test/CMakeLists.txt
index dc7e40c0039..ab7a9c75e17 100644
--- a/intern/cycles/test/CMakeLists.txt
+++ b/intern/cycles/test/CMakeLists.txt
@@ -86,14 +86,16 @@ list(APPEND ALL_CYCLES_LIBRARIES
 
 include_directories(${INC})
 
-link_directories(${OPENIMAGEIO_LIBPATH}
-                 ${BOOST_LIBPATH}
-                 ${PNG_LIBPATH}
-                 ${JPEG_LIBPATH}
-                 ${ZLIB_LIBPATH}
-                 ${TIFF_LIBPATH}
-                 ${OPENEXR_LIBPATH}
-                 ${OPENCOLORIO_LIBPATH})
+link_directories(
+  ${OPENIMAGEIO_LIBPATH}
+  ${BOOST_LIBPATH}
+  ${PNG_LIBPATH}
+  ${JPEG_LIBPATH}
+  ${ZLIB_LIBPATH}
+  ${TIFF_LIBPATH}
+  ${OPENEXR_LIBPATH}
+  ${OPENCOLORIO_LIBPATH}
+)
 
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}")
 set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
diff --git a/intern/quadriflow/CMakeLists.txt b/intern/quadriflow/CMakeLists.txt
index 5fe60f3eda2..457fceb2681 100644
--- a/intern/quadriflow/CMakeLists.txt
+++ b/intern/quadriflow/CMakeLists.txt
@@ -40,7 +40,7 @@ set(LIB
 )
 
 if(WIN32)
-    add_definitions(-D_USE_MATH_DEFINES)
+  add_definitions(-D_USE_MATH_DEFINES)
 endif()
 
 blender_add_lib(bf_intern_quadriflow "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/collada/CMakeLists.txt b/source/blender/collada/CMakeLists.txt
index a88fd05a18f..6f1c6922d63 100644
--- a/source/blender/collada/CMakeLists.txt
+++ b/source/blender/collada/CMakeLists.txt
@@ -20,16 +20,16 @@
 
 remove_strict_flags()
 FIND_FILE(OPENCOLLADA_ANIMATION_CLIP
-      NAMES
-        COLLADAFWAnimationClip.h
-      PATHS
-        ${OPENCOLLADA_INCLUDE_DIRS}
-      NO_DEFAULT_PATH
-    )
+  NAMES
+    COLLADAFWAnimationClip.h
+  PATHS
+    ${OPENCOLLADA_INCLUDE_DIRS}
+  NO_DEFAULT_PATH
+)
 
-IF(OPENCOLLADA_ANIMATION_CLIP)
-   add_definitions(-DWITH_OPENCOLLADA_ANIMATION_CLIP)
-ENDIF()
+if(OPENCOLLADA_ANIMATION_CLIP)
+  add_definitions(-DWITH_OPENCOLLADA_ANIMATION_CLIP)
+endif()
 
 set(INC
   .
diff --git a/source/blender/compositor/CMakeLists.txt b/source/blender/compositor/CMakeLists.txt
index 8d609d545f8..d524f4a0e1e 100644
--- a/source/blender/compositor/CMakeLists.txt
+++ b/source/blender/compositor/CMakeLists.txt
@@ -552,8 +552,11 @@ list(APPEND INC
   ${CMAKE_CURRENT_BINARY_DIR}/operations
 )
 
-data_to_c(${CMAKE_CURRENT_SOURCE_DIR}/operations/COM_OpenCLKernels.cl
-          ${CMAKE_CURRENT_BINARY_DIR}/operations/COM_OpenCLKernels.cl.h SRC)
+data_to_c(
+  ${CMAKE_CURRENT_SOURCE_DIR}/operations/COM_OpenCLKernels.cl
+  ${CMAKE_CURRENT_BINARY_DIR}/operations/COM_OpenCLKernels.cl.h
+  SRC
+)
 
 add_definitions(-DCL_USE_DEPRECATED_OPENCL_1_1_APIS)
 
diff --git a/tests/gtests/blenloader/CMakeLists.txt b/tests/gtests/blenloader/CMakeLists.txt
index 332abbfb40b..5c071c614c6 100644
--- a/tests/gtests/blenloader/CMakeLists.txt
+++ b/tests/gtests/blenloader/CMakeLists.txt
@@ -18,20 +18,20 @@
 # ***** END GPL LICENSE BLOCK *****
 
 set(INC
-    .
-    ..
-    ../../../source/blender/blenkernel
-    ../../../source/blender/blenlib
-    ../../../source/blender/blenloader
-    ../../../source/blender/depsgraph
-    ../../../source/blender/imbuf
-    ../../../source/blender/makesdna
-    ../../../source/blender/makesrna
-    ../../../source/blender/windowmanager
-    ../../../intern/guardedalloc
-    ${GLOG_INCLUDE_DIRS}
-    ${GFLAGS_INCLUDE_DIRS}
-    ../../../extern/gtest/include
+  .
+  ..
+  ../../../source/blender/blenkernel
+  ../../../source/blender/blenlib
+  ../../../source/blender/blenloader
+  ../../../source/blender/depsgraph
+  ../../../source/blender/imbuf
+  ../../../source/blender/makesdna
+  ../../../source/blender/makesrna
+  ../../../source/blender/windowmanager
+  ../../../intern/guardedalloc
+  ${GLOG_INCLUDE_DIRS}
+  ${GFLAGS_INCLUDE_DIRS}
+  ../../../extern/gtest/include
 )
 
 set(SRC
@@ -46,24 +46,24 @@ blender_add_lib(bf_blenloader_test "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
 
 
 set(INC
-    .
-    ..
-    ../../../source/blender/blenlib
-    ../../../source/blender/blenloader
-    ../../../source/blender/blenkernel
-    ../../../source/blender/makesdna
-    ../../../source/blender/makesrna
-    ../../../source/blender/depsgraph
-    ../../../intern/guardedalloc
+  .
+  ..
+  ../../../source/blender/blenlib
+  ../../../source/blender/blenloader
+  ../../../source/blender/blenkernel
+  ../../../source/blender/makesdna
+  ../../../source/blender/makesrna
+  ../../../source/blender/depsgraph
+  ../../../intern/guardedalloc
 )
 
 set(LIB
-    bf_blenloader_test
-    bf_blenloader
+  bf_blenloader_test
+  bf_blenloader
 
-    # Should not be needed but gives windows linker errors if the ocio libs are linked before this:
-    bf_intern_opencolorio
-    bf_gpu
+  # Should not be needed but gives windows linker errors if the ocio libs are linked before this:
+  bf_intern_opencolorio
+  bf_gpu
 )
 
 include_directories(${INC})
@@ -73,7 +73,7 @@ get_property(BLENDER_SORTED_LIBS GLOBAL PROPERTY BLENDER_SORTED_LIBS_PROP)
 
 
 set(SRC
-    blendfile_load_test.cc
+  blendfile_load_test.cc
 )
 if(WITH_BUILDINFO)
   list(APPEND SRC



More information about the Bf-blender-cvs mailing list