Changeset View
Changeset View
Standalone View
Standalone View
build_files/cmake/macros.cmake
| Show First 20 Lines • Show All 452 Lines • ▼ Show 20 Lines | BLENDER_SRC_GTEST_EX( | ||||
| EXTRA_LIBS "${library_deps}" | EXTRA_LIBS "${library_deps}" | ||||
| SKIP_ADD_TEST | SKIP_ADD_TEST | ||||
| ) | ) | ||||
| include(GTest) | include(GTest) | ||||
| set(_GOOGLETEST_DISCOVER_TESTS_SCRIPT | set(_GOOGLETEST_DISCOVER_TESTS_SCRIPT | ||||
| ${CMAKE_SOURCE_DIR}/build_files/cmake/Modules/GTestAddTests.cmake | ${CMAKE_SOURCE_DIR}/build_files/cmake/Modules/GTestAddTests.cmake | ||||
| ) | ) | ||||
| set(_env_vars) | |||||
| if(${name} STREQUAL "guardedalloc") | |||||
| string(APPEND _env_vars "ASAN_OPTIONS=allocator_may_return_null=true:$ENV{ASAN_OPTIONS}") | |||||
| endif() | |||||
| gtest_discover_tests(${name}_test | gtest_discover_tests(${name}_test | ||||
| DISCOVERY_MODE PRE_TEST | DISCOVERY_MODE PRE_TEST | ||||
sergey: If we go way of silencing warning using environment variable, the environment variable is to be… | |||||
| WORKING_DIRECTORY "${TEST_INSTALL_DIR}" | WORKING_DIRECTORY "${TEST_INSTALL_DIR}" | ||||
| ENV_VARS "${_env_vars}" | |||||
| ) | ) | ||||
| unset(_env_vars) | |||||
| endfunction() | endfunction() | ||||
| # Ninja only: assign 'heavy pool' to some targets that are especially RAM-consuming to build. | # Ninja only: assign 'heavy pool' to some targets that are especially RAM-consuming to build. | ||||
| function(setup_heavy_lib_pool) | function(setup_heavy_lib_pool) | ||||
| if(WITH_NINJA_POOL_JOBS AND NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS) | if(WITH_NINJA_POOL_JOBS AND NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS) | ||||
| if(WITH_CYCLES) | if(WITH_CYCLES) | ||||
| list(APPEND _HEAVY_LIBS "cycles_device" "cycles_kernel") | list(APPEND _HEAVY_LIBS "cycles_device" "cycles_kernel") | ||||
| endif() | endif() | ||||
| ▲ Show 20 Lines • Show All 796 Lines • Show Last 20 Lines | |||||
If we go way of silencing warning using environment variable, the environment variable is to be provided by the call where guardedalloc test is added.