From 30bbd1583f8bf2f348efdd0c20c5f6ecda3b205f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 14 Sep 2024 12:35:02 +1000 Subject: [PATCH] Cleanup: replace the term "folder" with "directory" for CMake files This was already more common an in keeping with cmake's own naming. --- CMakeLists.txt | 22 +++++++++++++--------- source/creator/CMakeLists.txt | 26 ++++++++++++-------------- tests/python/CMakeLists.txt | 12 ++++++++---- 3 files changed, 33 insertions(+), 27 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 819151ee18e..bd865ae6d68 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,8 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) if(NOT DEFINED WITH_IN_SOURCE_BUILD) message(FATAL_ERROR "CMake generation for blender is not allowed within the source directory!" - "\n Remove \"${CMAKE_SOURCE_DIR}/CMakeCache.txt\" and try again from another folder, e.g.:" + "\n Remove \"${CMAKE_SOURCE_DIR}/CMakeCache.txt\"" + "\n then try again from another directory, e.g.:" "\n " "\n rm -rf CMakeCache.txt CMakeFiles" "\n cd .." @@ -578,10 +579,10 @@ Install redistributable runtime, otherwise install into CMAKE_INSTALL_PREFIX" ) endif() -option(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON) +option(WITH_PYTHON_INSTALL "Copy system python into the blender install directory" ON) option(WITH_INSTALL_COPYRIGHT "\ -Copy the official Blender Authors's copyright.txt into the Blender install folder" +Copy the official Blender Authors's copyright.txt into the Blender install directory" OFF ) mark_as_advanced(WITH_INSTALL_COPYRIGHT) @@ -601,17 +602,20 @@ Path to python site-packages or dist-packages containing 'numpy' module" mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS) endif() if(WITH_PYTHON_INSTALL) - option(WITH_PYTHON_INSTALL_NUMPY "Copy system NumPy into the blender install folder" ON) + option(WITH_PYTHON_INSTALL_NUMPY "Copy system NumPy into the blender install directory" ON) if(UNIX AND NOT APPLE) - option(WITH_PYTHON_INSTALL_REQUESTS "Copy system requests into the blender install folder" ON) + option(WITH_PYTHON_INSTALL_REQUESTS "\ +Copy system requests into the blender install directory" + ON + ) set(PYTHON_REQUESTS_PATH "" CACHE PATH "\ Path to python site-packages or dist-packages containing 'requests' module" ) mark_as_advanced(PYTHON_REQUESTS_PATH) endif() - option(WITH_PYTHON_INSTALL_ZSTANDARD "Copy zstandard into the blender install folder" ON) + option(WITH_PYTHON_INSTALL_ZSTANDARD "Copy zstandard into the blender install directory" ON) set(PYTHON_ZSTANDARD_PATH "" CACHE PATH "\ Path to python site-packages or dist-packages containing 'zstandard' module" ) @@ -1099,13 +1103,13 @@ endif() if(WIN32 OR XCODE) option(IDE_GROUP_SOURCES_IN_FOLDERS "\ -Organize the source files in filters matching the source folders." +Organize the source files in filters matching the source directory." ON ) mark_as_advanced(IDE_GROUP_SOURCES_IN_FOLDERS) option(IDE_GROUP_PROJECTS_IN_FOLDERS "\ -Organize the projects according to source folder structure." +Organize the projects according to source directory structure." ON ) mark_as_advanced(IDE_GROUP_PROJECTS_IN_FOLDERS) @@ -1167,7 +1171,7 @@ default install path" endif() endif() -# Effective install path including config folder, as a generator expression. +# Effective install path including config directory, as a generator expression. get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) if(GENERATOR_IS_MULTI_CONFIG) string( diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 86dc95b0ba0..a5dac69c46f 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -740,7 +740,7 @@ if(UNIX AND NOT APPLE) ) # Remove from old location, so existing builds don't start with software - # OpenGL now that the lib/ folder is used for other libraries. + # OpenGL now that the `./lib/` directory is used for other libraries. install( CODE "\ file(REMOVE ${CMAKE_BINARY_DIR}/bin/lib/libGL.so)\n @@ -1019,7 +1019,7 @@ elseif(WIN32) ALL ) endif() - # 4.1 fftw libs need to be installed, in 4.2 fftw got turned into a static lib + # 4.1 FFTW libs need to be installed, in 4.2 FFTW got turned into a static lib # and the files below no longer exist. if(EXISTS ${LIBDIR}/fftw3/lib/fftw3.dll) windows_install_shared_manifest( @@ -1030,7 +1030,7 @@ elseif(WIN32) ) endif() if(MSVC_ASAN) - # The ASAN DLL's can be found in the same folder as the compiler, + # The ASAN DLL's can be found in the same directory as the compiler, # this is the easiest way to find these. string( REPLACE "cl.exe" "clang_rt.asan_dynamic-x86_64.dll" @@ -1298,9 +1298,8 @@ elseif(WIN32) ) endif() - # This will not exist for 3.4 and earlier lib folders - # to ease the transition, support both 3.4 and 3.5 lib - # folders. + # This will not exist for 3.4 and earlier `./lib` directory + # to ease the transition, support both 3.4 and 3.5 `./lib` directories. if(EXISTS ${USD_LIBRARY_DIR}/python/) install( DIRECTORY ${USD_LIBRARY_DIR}/python/ @@ -1322,9 +1321,8 @@ elseif(WIN32) ) endif() - # This will not exist for 3.4 and earlier lib folders - # to ease the transition, support both 3.4 and 3.5 lib - # folders. + # This will not exist for 3.4 and earlier `./lib` directories + # to ease the transition, support both 3.4 and 3.5 `./lib` directories. if(EXISTS ${LIBDIR}/openvdb/python/pyopenvdb_d.pyd) install( FILES ${LIBDIR}/openvdb/python/pyopenvdb_d.pyd @@ -1338,7 +1336,7 @@ elseif(WIN32) ) endif() - # this will exist for 4.1 lib folders + # This will exist for 4.1 `./lib` directories. if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64") set(_openvdb_arch arm64) else() @@ -1844,8 +1842,8 @@ if((DEFINED LIBDIR) AND TARGETDIR_LIB) endif() endif() if(WIN32) - # If this file exists we are building against a 3.5 22.03 library folder - # that needs these dll's installed. + # If this file exists we are building against a 3.5 22.03 library directory + # that needs these DLL's installed. if(EXISTS ${LIBDIR}/usd/lib/usd_usd_ms.dll) windows_install_shared_manifest(FILES ${LIBDIR}/usd/lib/usd_usd_ms.dll @@ -1856,8 +1854,8 @@ if((DEFINED LIBDIR) AND TARGETDIR_LIB) DEBUG ) endif() - # If this file exists we are building against a 3.5 22.11 library folder - # that needs these dll's installed. + # If this file exists we are building against a 3.5 22.11 library directory + # that needs these DLL's installed. if(EXISTS ${LIBDIR}/usd/lib/usd_ms.dll) windows_install_shared_manifest(FILES ${LIBDIR}/usd/lib/usd_ms.dll diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt index 63fb290d366..c279c0d8157 100644 --- a/tests/python/CMakeLists.txt +++ b/tests/python/CMakeLists.txt @@ -628,7 +628,9 @@ if(WITH_CYCLES OR WITH_GPU_RENDER_TESTS) if(NOT OPENIMAGEIO_TOOL) message(WARNING "Disabling render tests because OIIO oiiotool does not exist") elseif(NOT EXISTS "${TEST_SRC_DIR}/render/shader") - message(WARNING "Disabling render tests because tests folder does not exist at ${TEST_SRC_DIR}") + message( + WARNING "Disabling render tests because tests directory doesn't exist at ${TEST_SRC_DIR}" + ) elseif(NOT WITH_COMPOSITOR_CPU) message(WARNING "Disabling render tests because WITH_COMPOSITOR_CPU is disabled") elseif(NOT WITH_OPENCOLORIO) @@ -762,7 +764,7 @@ if(WITH_CYCLES OR WITH_GPU_RENDER_TESTS) ) endforeach() endif() - + if(WITH_METAL_BACKEND) foreach(render_test ${gpu_render_tests}) add_render_test( @@ -988,9 +990,11 @@ if(WITH_GPU_DRAW_TESTS) if(NOT OPENIMAGEIO_TOOL) message(STATUS "Disabling OpenGL draw tests because OIIO oiiotool does not exist") elseif(NOT EXISTS "${TEST_SRC_DIR}/opengl") - message(STATUS "Disabling OpenGL draw tests because tests folder does not exist at ${TEST_SRC_DIR}") + message( + STATUS "Disabling OpenGL draw tests because tests directory doesn't exist at ${TEST_SRC_DIR}" + ) else() - # Use all subdirectories of opengl folder. + # Use all subdirectories of the `opengl` directory. file(GLOB children RELATIVE ${TEST_SRC_DIR}/opengl ${TEST_SRC_DIR}/opengl/*) foreach(child ${children}) # Resolve symlinks, useful to test production files with linked libraries.