Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-10-28 17:32:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-10-28 17:33:44 +0300
commit312075e6883986fe2d1861811c7255b8898ab2cc (patch)
tree78e19f58559cef4f5da81ff8a95439b16f7fc510 /build_files/cmake
parent74c9a4769ebe028560f071254a010858eef57fa8 (diff)
CMake: add missing headers, use space before comments
Diffstat (limited to 'build_files/cmake')
-rw-r--r--build_files/cmake/Modules/FindIcuLinux.cmake16
-rw-r--r--build_files/cmake/Modules/FindPythonLibsUnix.cmake6
-rwxr-xr-xbuild_files/cmake/cmake_consistency_check.py3
-rw-r--r--build_files/cmake/macros.cmake24
-rw-r--r--build_files/cmake/platform/platform_apple.cmake12
-rw-r--r--build_files/cmake/platform/platform_win32.cmake4
6 files changed, 34 insertions, 31 deletions
diff --git a/build_files/cmake/Modules/FindIcuLinux.cmake b/build_files/cmake/Modules/FindIcuLinux.cmake
index c5164913f7f..689550a17bb 100644
--- a/build_files/cmake/Modules/FindIcuLinux.cmake
+++ b/build_files/cmake/Modules/FindIcuLinux.cmake
@@ -38,14 +38,14 @@ SET(_icu_SEARCH_DIRS
)
# We don't need includes, only libs to link against...
-#FIND_PATH(ICU_INCLUDE_DIR
-# NAMES
-# utf.h
-# HINTS
-# ${_icu_SEARCH_DIRS}
-# PATH_SUFFIXES
-# include/unicode
-#)
+# FIND_PATH(ICU_INCLUDE_DIR
+# NAMES
+# utf.h
+# HINTS
+# ${_icu_SEARCH_DIRS}
+# PATH_SUFFIXES
+# include/unicode
+# )
FIND_LIBRARY(ICU_LIBRARY_DATA
NAMES
diff --git a/build_files/cmake/Modules/FindPythonLibsUnix.cmake b/build_files/cmake/Modules/FindPythonLibsUnix.cmake
index 84e1fbdb35c..966ac9a4459 100644
--- a/build_files/cmake/Modules/FindPythonLibsUnix.cmake
+++ b/build_files/cmake/Modules/FindPythonLibsUnix.cmake
@@ -83,9 +83,9 @@ IF((NOT _IS_INC_DEF) OR (NOT _IS_INC_CONF_DEF) OR (NOT _IS_LIB_DEF) OR (NOT _IS_
)
FOREACH(_CURRENT_ABI_FLAGS ${_PYTHON_ABI_FLAGS_TEST})
- #IF(CMAKE_BUILD_TYPE STREQUAL Debug)
- # SET(_CURRENT_ABI_FLAGS "d${_CURRENT_ABI_FLAGS}")
- #ENDIF()
+ # IF(CMAKE_BUILD_TYPE STREQUAL Debug)
+ # SET(_CURRENT_ABI_FLAGS "d${_CURRENT_ABI_FLAGS}")
+ # ENDIF()
STRING(REPLACE " " "" _CURRENT_ABI_FLAGS ${_CURRENT_ABI_FLAGS})
IF(NOT DEFINED PYTHON_INCLUDE_DIR)
diff --git a/build_files/cmake/cmake_consistency_check.py b/build_files/cmake/cmake_consistency_check.py
index e23d4dae48a..c5689268933 100755
--- a/build_files/cmake/cmake_consistency_check.py
+++ b/build_files/cmake/cmake_consistency_check.py
@@ -149,6 +149,9 @@ def cmake_get_src(f):
if not l.startswith("#"):
+ # Remove in-line comments.
+ l = l.split(" # ")[0].rstrip()
+
if ")" in l:
if l.strip() != ")":
raise Exception("strict formatting not kept '*)' %s:%d" % (f, i))
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index c3025be34ba..4f5abf8d561 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -147,9 +147,9 @@ function(blender_include_dirs
get_filename_component(_ABS_INC ${_INC} ABSOLUTE)
list(APPEND _ALL_INCS ${_ABS_INC})
# for checking for invalid includes, disable for regular use
- ##if(NOT EXISTS "${_ABS_INC}/")
- ## message(FATAL_ERROR "Include not found: ${_ABS_INC}/")
- ##endif()
+ # if(NOT EXISTS "${_ABS_INC}/")
+ # message(FATAL_ERROR "Include not found: ${_ABS_INC}/")
+ # endif()
endforeach()
include_directories(${_ALL_INCS})
endfunction()
@@ -162,9 +162,9 @@ function(blender_include_dirs_sys
foreach(_INC ${ARGV})
get_filename_component(_ABS_INC ${_INC} ABSOLUTE)
list(APPEND _ALL_INCS ${_ABS_INC})
- ##if(NOT EXISTS "${_ABS_INC}/")
- ## message(FATAL_ERROR "Include not found: ${_ABS_INC}/")
- ##endif()
+ # if(NOT EXISTS "${_ABS_INC}/")
+ # message(FATAL_ERROR "Include not found: ${_ABS_INC}/")
+ # endif()
endforeach()
include_directories(SYSTEM ${_ALL_INCS})
endfunction()
@@ -173,7 +173,7 @@ function(blender_source_group
sources
)
- #if enabled, use the sources directories as filters.
+ # if enabled, use the sources directories as filters.
if(WINDOWS_USE_VISUAL_STUDIO_SOURCE_FOLDERS)
foreach(_SRC ${sources})
# remove ../'s
@@ -259,7 +259,7 @@ function(blender_add_lib__impl
# listed is helpful for IDE's (QtCreator/MSVC)
blender_source_group("${sources}")
- #if enabled, set the FOLDER property for visual studio projects
+ # if enabled, set the FOLDER property for visual studio projects
if(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS)
get_filename_component(FolderDir ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
string(REPLACE ${CMAKE_SOURCE_DIR} "" FolderDir ${FolderDir})
@@ -375,7 +375,7 @@ function(SETUP_LIBDIRS)
endif()
if(WITH_OPENCOLLADA)
link_directories(${OPENCOLLADA_LIBPATH})
- ## Never set
+ # # Never set
# link_directories(${PCRE_LIBPATH})
# link_directories(${EXPAT_LIBPATH})
endif()
@@ -569,11 +569,11 @@ function(setup_liblinks
${ZLIB_LIBRARIES}
)
- #system libraries with no dependencies such as platform link libs or opengl should go last
+ # System libraries with no dependencies such as platform link libs or opengl should go last.
target_link_libraries(${target}
${BLENDER_GL_LIBRARIES})
- #target_link_libraries(${target} ${PLATFORM_LINKLIBS} ${CMAKE_DL_LIBS})
+ # target_link_libraries(${target} ${PLATFORM_LINKLIBS} ${CMAKE_DL_LIBS})
target_link_libraries(${target} ${PLATFORM_LINKLIBS})
endfunction()
@@ -1067,7 +1067,7 @@ function(data_to_c_simple_icons
add_custom_command(
OUTPUT ${_file_from} ${_file_to}
COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
- #COMMAND python3 ${CMAKE_SOURCE_DIR}/source/blender/datatoc/datatoc_icon.py ${_path_from_abs} ${_file_from}
+ # COMMAND python3 ${CMAKE_SOURCE_DIR}/source/blender/datatoc/datatoc_icon.py ${_path_from_abs} ${_file_from}
COMMAND "$<TARGET_FILE:datatoc_icon>" ${_path_from_abs} ${_file_from}
COMMAND "$<TARGET_FILE:datatoc>" ${_file_from} ${_file_to}
DEPENDS
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake
index 3ae3b2b66b5..578ad143d59 100644
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@ -100,8 +100,8 @@ if(WITH_PYTHON)
set(PYTHON_INCLUDE_DIR "${_py_framework}/include/python${PYTHON_VERSION}m")
set(PYTHON_EXECUTABLE "${_py_framework}/bin/python${PYTHON_VERSION}m")
set(PYTHON_LIBPATH "${_py_framework}/lib/python${PYTHON_VERSION}/config-${PYTHON_VERSION}m")
- #set(PYTHON_LIBRARY python${PYTHON_VERSION})
- #set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework Python") # won't build with this enabled
+ # set(PYTHON_LIBRARY python${PYTHON_VERSION})
+ # set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework Python") # won't build with this enabled
unset(_py_framework)
endif()
@@ -218,12 +218,12 @@ if(WITH_OPENCOLLADA)
${OPENCOLLADA_LIBPATH}/libxml2.a
)
# PCRE is bundled with openCollada
- #set(PCRE ${LIBDIR}/pcre)
- #set(PCRE_LIBPATH ${PCRE}/lib)
+ # set(PCRE ${LIBDIR}/pcre)
+ # set(PCRE_LIBPATH ${PCRE}/lib)
set(PCRE_LIBRARIES pcre)
# libxml2 is used
- #set(EXPAT ${LIBDIR}/expat)
- #set(EXPAT_LIBPATH ${EXPAT}/lib)
+ # set(EXPAT ${LIBDIR}/expat)
+ # set(EXPAT_LIBPATH ${EXPAT}/lib)
set(EXPAT_LIB)
endif()
diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake
index ef7722b0aef..e2006be8fc2 100644
--- a/build_files/cmake/platform/platform_win32.cmake
+++ b/build_files/cmake/platform/platform_win32.cmake
@@ -160,7 +160,7 @@ set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MT")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MT")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MT")
-#JMC is available on msvc 15.8 (1915) and up
+# JMC is available on msvc 15.8 (1915) and up
if(MSVC_VERSION GREATER 1914 AND NOT MSVC_CLANG)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /JMC")
endif()
@@ -587,7 +587,7 @@ endif()
# used in many places so include globally, like OpenGL
blender_include_dirs_sys("${PTHREADS_INCLUDE_DIRS}")
-#find signtool
+# Find signtool.
set(ProgramFilesX86_NAME "ProgramFiles(x86)") #env dislikes the ( )
find_program(SIGNTOOL_EXE signtool
HINTS