mirror of
https://gitee.com/openharmony/third_party_vulkan-loader
synced 2024-11-23 15:20:52 +00:00
f3bc815c74
This is a first pass reorganization of CMake files in this repo. It consists primarily of dead code/variable removal, simplification, and reformatting by latest cmake-format. bump to cmake_minimum_required(3.4) for ccache simplify excessive use of generator expressions clarify why CMAKE_OSX_DEPLOYMENT_TARGET is pre-project(). clarify setting Windows install prefix if needed remove unused DisplayServer variable remove obsolete argument to endif() remove unneeded ccache property RULE_LAUNCH_LINK ccache doesn't affect linking, so the property is meaningless. remove unneeded CMAKE_VERBOSE_MAKEFILE hardcode. remove extra CMAKE_MODULE_PATH remove extra cmake_minimum_required change PYTHON_CMD to PYTHON_EXECUTABLE change CMAKE_SYSTEM_NAME to UNIX/APPLE/WIN32 Use consistent platform identification. Note that UNIX evaluates true for OSX, so whenever the code intends "Linux only", we use (UNIX AND NOT APPLE). remove unneeded TARGET_NAMES variable remove unneeded VK_LAYER_RPATH variable change 'ln -sf' to 'cmake -E create_symlink' reorder dependencies for clarity rearrange order of macro arguments rename run_vk_xml_generate to GenerateFromVkXml rename add_vk_layer to AddVkLayer Borrowing from the Google style guide, use camel-case to more easily identify locally-defined macros/functions. remove unneeded WRAP_SRCS variable remove unneeded TEST_SRCS variable move check of VulkanRegistry_FOUND move SCRIPTS_DIR closer to point of use move include(FindPkgConfig) earlier move CMAKE_MACOSX_RPATH earlier move option() eariler move GenerateFromVkXml invocations earlier Move invocations to be closer to the definition of the macro. Minor edits to comments. move API_NAME earlier remove unused BUILDTGT_DIR variable move add_executable() earlier combine if(WIN32) trees .cmake-format.py 0.4.1 reformat using cmake-format 0.4.1 Change-Id: Ia251e932dbc9a8f2655201bb12248dea8c940c30
35 lines
956 B
Python
35 lines
956 B
Python
# Configuration for cmake-format (v0.4.1, circa Jul 2018)
|
|
# https://github.com/cheshirekow/cmake_format
|
|
|
|
# How wide to allow formatted cmake files
|
|
line_width = 132
|
|
|
|
# How many spaces to tab for indent
|
|
tab_size = 4
|
|
|
|
# If arglists are longer than this, break them always
|
|
max_subargs_per_line = 3
|
|
|
|
# If true, separate flow control names from their parentheses with a space
|
|
separate_ctrl_name_with_space = False
|
|
|
|
# If true, separate function names from parentheses with a space
|
|
separate_fn_name_with_space = False
|
|
|
|
# If a statement is wrapped to more than one line, than dangle the closing
|
|
# parenthesis on it's own line
|
|
dangle_parens = False
|
|
|
|
# What character to use for bulleted lists
|
|
bullet_char = u'*'
|
|
|
|
# What character to use as punctuation after numerals in an enumerated list
|
|
enum_char = u'.'
|
|
|
|
# What style line endings to use in the output.
|
|
line_ending = u'unix'
|
|
|
|
# Format command names consistently as 'lower' or 'upper' case
|
|
command_case = u'lower'
|
|
|