Relative Content

Tag Archive for cmake

Limiting the Scope of Variables in CMake to specific Projects/Subdirectories

I would like to set a variable that is available for modification in a third-party library which I have included as a subdirectory (add_subdirectory(.../third_party/libA)). The library allows me to enable/disable certain portions of the build process such as to including testing targets, for example: set(BUILD_TESTS OFF).

CMake 3(.27(.7)) : check syntax/structure only

With CMake 3(.27(.7)), how to only check for syntax and structure without actually performing any of the commands ? I am doing a fairly complex code merge and want to be careful and step-by-step.