Changeset View
Changeset View
Standalone View
Standalone View
tests/gtests/CMakeLists.txt
| # GTest | |||||
| if(WITH_GTESTS) | if(WITH_GTESTS) | ||||
| # Otherwise we get warnings here that we cant fix in external projects | |||||
| remove_strict_flags() | |||||
| include(GTestTesting) | # Build the test runner module that's called by using Blender's --gtests CLI argument. | ||||
| set(SRC | |||||
| gtests_runner.cc | |||||
| gtests_runner.h | |||||
| ) | |||||
| set(INC | |||||
| ../../source/blender/blenlib | |||||
sergey: `# This runner takes care of ...` | |||||
| add_definitions(${GFLAGS_DEFINES}) | ../../intern/guardedalloc | ||||
| add_definitions(${GLOG_DEFINES}) | ../../extern/gflags/src | ||||
| add_definitions(-DBLENDER_GFLAGS_NAMESPACE=${GFLAGS_NAMESPACE}) | ../../extern/gtest/include | ||||
| ) | |||||
| blender_add_lib(bf_gtest_runner "${SRC}" "${INC}" "${INC_SYS}" "extern_gtest") | |||||
| # Otherwise we get warnings here that we cant fix in external projects | # Build the not-yet-ported tests | ||||
| remove_strict_flags() | include(GTestTesting) | ||||
| # This is now globally enabled: | |||||
| # add_definitions(${GFLAGS_DEFINES}) | |||||
| # add_definitions(${GLOG_DEFINES}) | |||||
| # add_definitions(-DBLENDER_GFLAGS_NAMESPACE=${GFLAGS_NAMESPACE}) | |||||
| add_subdirectory(testing) | add_subdirectory(testing) | ||||
| add_subdirectory(blenkernel) | |||||
| add_subdirectory(blenlib) | add_subdirectory(blenlib) | ||||
| add_subdirectory(blenloader) | add_subdirectory(blenloader) | ||||
| add_subdirectory(guardedalloc) | add_subdirectory(guardedalloc) | ||||
Done Inline ActionsThe logic here should be changed like we did in: rB59b523c3c98e: Fix build with USD, Clang and Linux. brecht: The logic here should be changed like we did in: {rB59b523c}. | |||||
| add_subdirectory(bmesh) | add_subdirectory(bmesh) | ||||
| if(WITH_CODEC_FFMPEG) | if(WITH_CODEC_FFMPEG) | ||||
| add_subdirectory(ffmpeg) | add_subdirectory(ffmpeg) | ||||
Done Inline ActionsMaybe a good name for this executable is just blender_test rather than bf_gtest_runner_test? I guess running it will work like any other test executable, the difference would be that for ctest it's called with specific arguments to run a subset of the tests. brecht: Maybe a good name for this executable is just `blender_test` rather than… | |||||
Done Inline ActionsDoing all this setup for blender_test and then going into all the subdirectories is causing problems here with duplicate build flags, that then give build errors. We can split building the test runner into another folder, at least as long as we need subdirectories here for non-ported tests. brecht: Doing all this setup for `blender_test` and then going into all the subdirectories is causing… | |||||
| endif() | endif() | ||||
| if(WITH_ALEMBIC) | if(WITH_ALEMBIC) | ||||
| add_subdirectory(alembic) | add_subdirectory(alembic) | ||||
| endif() | endif() | ||||
| if(WITH_USD) | if(WITH_USD) | ||||
| add_subdirectory(usd) | add_subdirectory(usd) | ||||
| endif() | endif() | ||||
| endif() | endif() | ||||
# This runner takes care of ...