Cleanup: use 2 space indentation for CMake

This commit is contained in:
Campbell Barton
2019-04-17 06:35:54 +02:00
parent 91a9cd0a94
commit 3076d95ba4
121 changed files with 8430 additions and 8430 deletions

View File

@@ -25,19 +25,19 @@ set(TEST_OUT_DIR ${CMAKE_BINARY_DIR}/tests)
# ugh, any better way to do this on testing only?
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${TEST_OUT_DIR})
#~ if(NOT IS_DIRECTORY ${TEST_SRC_DIR})
#~ message(FATAL_ERROR "CMake test directory not found!")
#~ endif()
#~ if(NOT IS_DIRECTORY ${TEST_SRC_DIR})
#~ message(FATAL_ERROR "CMake test directory not found!")
#~ endif()
# all calls to blender use this
if(APPLE)
if(${CMAKE_GENERATOR} MATCHES "Xcode")
set(TEST_BLENDER_EXE ${EXECUTABLE_OUTPUT_PATH}/Debug/blender.app/Contents/MacOS/blender)
else()
set(TEST_BLENDER_EXE ${EXECUTABLE_OUTPUT_PATH}/blender.app/Contents/MacOS/blender)
endif()
if(${CMAKE_GENERATOR} MATCHES "Xcode")
set(TEST_BLENDER_EXE ${EXECUTABLE_OUTPUT_PATH}/Debug/blender.app/Contents/MacOS/blender)
else()
set(TEST_BLENDER_EXE ${EXECUTABLE_OUTPUT_PATH}/blender.app/Contents/MacOS/blender)
endif()
else()
set(TEST_BLENDER_EXE ${EXECUTABLE_OUTPUT_PATH}/blender)
set(TEST_BLENDER_EXE ${EXECUTABLE_OUTPUT_PATH}/blender)
endif()
# for testing with valgrind prefix: valgrind --track-origins=yes --error-limit=no
@@ -47,14 +47,14 @@ set(TEST_BLENDER_EXE ${TEST_BLENDER_EXE} --background -noaudio --factory-startup
# ------------------------------------------------------------------------------
macro(VIEW_LAYER_TEST test_name)
# Adds ${CMAKE_CURRENT_LIST_DIR} to sys.path so that the tests can import
# things from view_layer_common.py
add_test(view_layer_${test_name} ${TEST_BLENDER_EXE}
--python-expr "import sys; sys.path.append('${CMAKE_CURRENT_LIST_DIR}')"
--python-exit-code 1
--python ${CMAKE_CURRENT_LIST_DIR}/test_${test_name}.py --
--testdir="${TEST_SRC_DIR}/layers"
)
# Adds ${CMAKE_CURRENT_LIST_DIR} to sys.path so that the tests can import
# things from view_layer_common.py
add_test(view_layer_${test_name} ${TEST_BLENDER_EXE}
--python-expr "import sys; sys.path.append('${CMAKE_CURRENT_LIST_DIR}')"
--python-exit-code 1
--python ${CMAKE_CURRENT_LIST_DIR}/test_${test_name}.py --
--testdir="${TEST_SRC_DIR}/layers"
)
endmacro()
VIEW_LAYER_TEST(active_collection)