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-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /intern/ghost/test/CMakeLists.txt
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'intern/ghost/test/CMakeLists.txt')
-rw-r--r--intern/ghost/test/CMakeLists.txt218
1 files changed, 109 insertions, 109 deletions
diff --git a/intern/ghost/test/CMakeLists.txt b/intern/ghost/test/CMakeLists.txt
index 9f714ae4fba..a5a41209603 100644
--- a/intern/ghost/test/CMakeLists.txt
+++ b/intern/ghost/test/CMakeLists.txt
@@ -14,43 +14,43 @@ set(WITH_GUARDEDALLOC ON)
# stub macro, does nothing
macro(blender_add_lib
- name
- sources
- includes
- includes_sys
- )
+ name
+ sources
+ includes
+ includes_sys
+ )
endmacro()
# suffix relative paths so we can use external cmake files
macro(suffix_relpaths
- new_files files prefix)
-
- set(${new_files})
- foreach(_file ${files})
- if(IS_ABSOLUTE _file)
- list(APPEND ${new_files} ${_file})
- else()
- list(APPEND ${new_files} "${prefix}${_file}")
- endif()
- endforeach()
- unset(_file)
+ new_files files prefix)
+
+ set(${new_files})
+ foreach(_file ${files})
+ if(IS_ABSOLUTE _file)
+ list(APPEND ${new_files} ${_file})
+ else()
+ list(APPEND ${new_files} "${prefix}${_file}")
+ endif()
+ endforeach()
+ unset(_file)
endmacro()
macro(data_to_c
file_from file_to
list_to_add)
- list(APPEND ${list_to_add} ${file_to})
+ list(APPEND ${list_to_add} ${file_to})
- get_filename_component(_file_to_path ${file_to} PATH)
+ get_filename_component(_file_to_path ${file_to} PATH)
- add_custom_command(
- OUTPUT ${file_to}
- COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
- COMMAND ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/datatoc ${file_from} ${file_to}
- DEPENDS ${file_from} datatoc)
- unset(_file_to_path)
+ add_custom_command(
+ OUTPUT ${file_to}
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
+ COMMAND ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/datatoc ${file_from} ${file_to}
+ DEPENDS ${file_from} datatoc)
+ unset(_file_to_path)
endmacro()
# -----------------------------------------------------------------------------
@@ -58,24 +58,24 @@ endmacro()
# set the endian define
if(MSVC)
- # for some reason this fails on msvc
- add_definitions(-D__LITTLE_ENDIAN__)
+ # for some reason this fails on msvc
+ add_definitions(-D__LITTLE_ENDIAN__)
else()
- include(TestBigEndian)
- test_big_endian(_SYSTEM_BIG_ENDIAN)
- if(_SYSTEM_BIG_ENDIAN)
- add_definitions(-D__BIG_ENDIAN__)
- else()
- add_definitions(-D__LITTLE_ENDIAN__)
- endif()
- unset(_SYSTEM_BIG_ENDIAN)
+ include(TestBigEndian)
+ test_big_endian(_SYSTEM_BIG_ENDIAN)
+ if(_SYSTEM_BIG_ENDIAN)
+ add_definitions(-D__BIG_ENDIAN__)
+ else()
+ add_definitions(-D__LITTLE_ENDIAN__)
+ endif()
+ unset(_SYSTEM_BIG_ENDIAN)
endif()
# -----------------------------------------------------------------------------
# Libraries
if(UNIX AND NOT APPLE)
- set(WITH_X11 ON)
+ set(WITH_X11 ON)
endif()
# for now... default to this
add_definitions(-DWITH_GL_PROFILE_COMPAT)
@@ -126,27 +126,27 @@ add_library(glewmx_lib ${SRC_NEW})
# grr, blenfont needs BLI
include_directories(
- "../../../source/blender/blenlib"
- )
+ "../../../source/blender/blenlib"
+ )
add_library(bli_lib
- "../../../source/blender/blenlib/intern/fileops.c"
- "../../../source/blender/blenlib/intern/gsqueue.c"
- "../../../source/blender/blenlib/intern/rct.c"
- "../../../source/blender/blenlib/intern/string.c"
- "../../../source/blender/blenlib/intern/string_utf8.c"
- "../../../source/blender/blenlib/intern/listbase.c"
- "../../../source/blender/blenlib/intern/math_color.c"
- "../../../source/blender/blenlib/intern/storage.c"
- "../../../source/blender/blenlib/intern/task.c"
- "../../../source/blender/blenlib/intern/threads.c"
- "../../../source/blender/blenlib/intern/time.c"
- "../../../source/blender/blenlib/intern/path_util.c"
- "../../../source/blender/blenlib/intern/BLI_dynstr.c"
- "../../../source/blender/blenlib/intern/BLI_linklist.c"
- "../../../source/blender/blenlib/intern/BLI_memarena.c"
- "../../../source/blender/blenlib/intern/BLI_mempool.c"
- "../../../source/blender/blenlib/intern/system.c"
- )
+ "../../../source/blender/blenlib/intern/fileops.c"
+ "../../../source/blender/blenlib/intern/gsqueue.c"
+ "../../../source/blender/blenlib/intern/rct.c"
+ "../../../source/blender/blenlib/intern/string.c"
+ "../../../source/blender/blenlib/intern/string_utf8.c"
+ "../../../source/blender/blenlib/intern/listbase.c"
+ "../../../source/blender/blenlib/intern/math_color.c"
+ "../../../source/blender/blenlib/intern/storage.c"
+ "../../../source/blender/blenlib/intern/task.c"
+ "../../../source/blender/blenlib/intern/threads.c"
+ "../../../source/blender/blenlib/intern/time.c"
+ "../../../source/blender/blenlib/intern/path_util.c"
+ "../../../source/blender/blenlib/intern/BLI_dynstr.c"
+ "../../../source/blender/blenlib/intern/BLI_linklist.c"
+ "../../../source/blender/blenlib/intern/BLI_memarena.c"
+ "../../../source/blender/blenlib/intern/BLI_mempool.c"
+ "../../../source/blender/blenlib/intern/system.c"
+ )
set(PLATFORM_CGLAGS)
@@ -162,26 +162,26 @@ include_directories(${FREETYPE_INCLUDE_DIRS})
include_directories(${CMAKE_SOURCE_DIR}/../../../source/blender/blenfont)
if(CMAKE_COMPILER_IS_GNUCC)
- set(PLATFORM_CFLAGS "-funsigned-char")
+ set(PLATFORM_CFLAGS "-funsigned-char")
endif()
if(UNIX AND NOT APPLE)
- find_package(X11 REQUIRED)
- find_package(GLEW)
-
- if(NOT GLEW_FOUND)
- message(FATAL_ERROR "GLEW is required to build blender, install it or disable WITH_SYSTEM_GLEW")
- endif()
-
- set(PLATFORM_LINKLIBS
- ${X11_X11_LIB}
- ${X11_Xinput_LIB}
- ${GLEW_LIBRARY}
- -lpthread
- )
+ find_package(X11 REQUIRED)
+ find_package(GLEW)
+
+ if(NOT GLEW_FOUND)
+ message(FATAL_ERROR "GLEW is required to build blender, install it or disable WITH_SYSTEM_GLEW")
+ endif()
+
+ set(PLATFORM_LINKLIBS
+ ${X11_X11_LIB}
+ ${X11_Xinput_LIB}
+ ${GLEW_LIBRARY}
+ -lpthread
+ )
else()
- # set(GLEW_LIBRARY "") # unused
- set(GLEW_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/extern/glew/include")
+ # set(GLEW_LIBRARY "") # unused
+ set(GLEW_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/extern/glew/include")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS}")
@@ -192,34 +192,34 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS}")
# DataToC
add_executable(datatoc
- ${CMAKE_SOURCE_DIR}/../../../source/blender/datatoc/datatoc.c)
+ ${CMAKE_SOURCE_DIR}/../../../source/blender/datatoc/datatoc.c)
# Gears (C)
add_executable(gears_c
- ${CMAKE_SOURCE_DIR}/gears/GHOST_C-Test.c)
+ ${CMAKE_SOURCE_DIR}/gears/GHOST_C-Test.c)
target_link_libraries(gears_c
- ghost_lib
- glewmx_lib
- string_lib
- ${OPENGL_gl_LIBRARY}
- ${CMAKE_DL_LIBS}
- ${PLATFORM_LINKLIBS}
- )
+ ghost_lib
+ glewmx_lib
+ string_lib
+ ${OPENGL_gl_LIBRARY}
+ ${CMAKE_DL_LIBS}
+ ${PLATFORM_LINKLIBS}
+ )
# Gears (C++)
add_executable(gears_cpp
- ${CMAKE_SOURCE_DIR}/gears/GHOST_Test.cpp)
+ ${CMAKE_SOURCE_DIR}/gears/GHOST_Test.cpp)
target_link_libraries(gears_cpp
- ghost_lib
- glewmx_lib
- string_lib
- ${OPENGL_gl_LIBRARY}
- ${CMAKE_DL_LIBS}
- ${PLATFORM_LINKLIBS}
- )
+ ghost_lib
+ glewmx_lib
+ string_lib
+ ${OPENGL_gl_LIBRARY}
+ ${CMAKE_DL_LIBS}
+ ${PLATFORM_LINKLIBS}
+ )
# MultiTest (C)
@@ -228,28 +228,28 @@ data_to_c(${CMAKE_SOURCE_DIR}/../../../release/datafiles/bfont.ttf
${CMAKE_CURRENT_BINARY_DIR}/bfont.ttf.c data_to_c_files)
add_executable(multitest_c
- ${CMAKE_SOURCE_DIR}/multitest/Basic.c
- ${CMAKE_SOURCE_DIR}/multitest/EventToBuf.c
- ${CMAKE_SOURCE_DIR}/multitest/MultiTest.c
- ${CMAKE_SOURCE_DIR}/multitest/ScrollBar.c
- ${CMAKE_SOURCE_DIR}/multitest/Util.c
- ${CMAKE_SOURCE_DIR}/multitest/WindowData.c
- ${CMAKE_SOURCE_DIR}/multitest/stubs.c
- ${data_to_c_files}
+ ${CMAKE_SOURCE_DIR}/multitest/Basic.c
+ ${CMAKE_SOURCE_DIR}/multitest/EventToBuf.c
+ ${CMAKE_SOURCE_DIR}/multitest/MultiTest.c
+ ${CMAKE_SOURCE_DIR}/multitest/ScrollBar.c
+ ${CMAKE_SOURCE_DIR}/multitest/Util.c
+ ${CMAKE_SOURCE_DIR}/multitest/WindowData.c
+ ${CMAKE_SOURCE_DIR}/multitest/stubs.c
+ ${data_to_c_files}
)
target_link_libraries(multitest_c
- blenfont_lib
- bli_lib
- ghost_lib
- glewmx_lib
- string_lib
- guardedalloc_lib
- wcwidth_lib
- ${OPENGL_gl_LIBRARY}
- ${FREETYPE_LIBRARY}
- ${ZLIB_LIBRARIES}
- ${CMAKE_DL_LIBS}
- ${PLATFORM_LINKLIBS}
- )
+ blenfont_lib
+ bli_lib
+ ghost_lib
+ glewmx_lib
+ string_lib
+ guardedalloc_lib
+ wcwidth_lib
+ ${OPENGL_gl_LIBRARY}
+ ${FREETYPE_LIBRARY}
+ ${ZLIB_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+ ${PLATFORM_LINKLIBS}
+ )