scripts/cmake/README.md
The order of the includes are shown (.cmake is implied)
project() call, in order to do fixup on teh compiler flagsSome rules:
By default, it uses RelWithDebugInfo build type.
We use Debug builds if you pass in --opt-level=N, where N<2.
CMake builds honour the same feature flags as the legacy Waf flow. Pass
--with-asan, --with-ubsan, or --with-tsan after the -- separator when
invoking scripts/build.py and the configure step applies the matching
WITH_* cache options (e.g. WITH_ASAN=ON). The graphics toggles such as
--with-vulkan continue to map to WITH_VULKAN.
Just as before, we invoke a separate, single configure + build command for each built library.
This is done via build.py : _build_engine_lib_cmake
Currently, the CMake configuration will generate build commands for the unit tests as well. Instead, the option of building and/or running the tests is moved to when executing Ninja build command.
You can create a top level CMakeLists.txt and a solution with the build command:
./scripts/build.py make_solution --platform=arm64-macos
Note that for e.g. Android, the CMakeLists.txt is the solution.
CMake outputs into different folder structures than before, so make not of any previous assumptions that may be stored in helper scripts etc.
For tests that need to load build content, we have a define DM_USE_CMAKE that can be used to fixup the build folder. We may replace that with an actual DM_TEST_CONTENT_PATH later.