CI/CD at developers fingertips
If you are a CMake expert you might prefer writing your build scripts yourself, tipi smart algorithm can be configured not to generate CMakeLists for you, on specific projects area or as a whole, while still helping you in dependency management and build acceleration.
tipi enables remote compilation for cmake, for example if you want to build your project on a linux with 128 cores:
tipi build . -t linux --use-cmakelists -j128
📝 The shorthand
-u
is also available for--use-cmakelists
.
By default tipi generates CMakeLists and all the time-consuming find_package
, target_link_libraries
, add_executable
parts for you.
So that you are not obliged to learn CMake or fiddle with complex cmake knowledge, while still benefiting from all CMake advantages and interoperability.
However if you prefer to write your own CMakeLists, tipi can assist you as follow in many ways :
It is possible to customize the CMakeLists templates that tipi uses for your project, while benefitting from all information from the tipi smart source code scan as a Mustache CMakeLists.txt.tpl
template.
To generate a sample CMakeLists.txt.tpl :
tipi cmaketpl
Then it is possible to extend/configure the cmake files outputted by the tipi smart build algorithm with variables ( documented in the generated sample ) likes {{#executables}}, {{#deps}}, {{cmake_target_name}}, {{cpp_files}}...
.
If you prefer to write your own CMakeLists and don't need any of the tipi smart build features, you can either fully disable for the current project the smart build algorithm with :
tipi . --use-cmakelists -G <cmake generator> -- -DBUILD_SHARED_LIBS=ON
Any parameter passed after --
are forwarded to CMake.
💡 You can still pull and build dependencies with the tipi smart build algorithm, particularly useful if the external project doesn't provide CMake support.
If an external dependency or library has good cmake support it's possible to use it with "u" : true
in the dependency specification.
You can then also specifiy which exact CMake packages and targets you want to be find_package
d and linked too, by your project's tipi smart build.
{
"google/googletest" : { "u" : true, "packages": ["GTest"], "targets": ["GTest::gtest"] }
}
Learn more in tipi dependencies documentation
use-cmake.tipi
: custom CMakeLists for a specific folderIf you add an empty file use-cmake.tipi
in some of your source directories, then the tipi algorithms will expect you to provide the CMakeLists.txt
for this directory.
It allows to have some very specific cmake code or highly customized build process for one part of your project, while still benefitting from tipi's smart build anywhere else in your source tree.