qibuild.cmake - CMake tools

qibuild.cmake.check_root_cmake_list(cmake_list_file, project_name)

Check that the root CMakeLists.txt is correct.

Those checks are necessary for cross-compilation to work well, among other things.

qibuild.cmake.cmake(source_dir, build_dir, cmake_args, clean_first=True, env=None)

Call cmake with from a build dir for a source dir. cmake_args are added on the command line.

If clean_first is True, we will remove cmake-generated files. Useful when dependencies have changed.

qibuild.cmake.get_cmake_qibuild_dir()

Get the path to cmake modules.

First, assume we are using qibuild from sources, then assume we are using an installed version of qibuild.

qibuild.cmake.get_known_cmake_generators()

Get the list of known cmake generators. Assume cmake is in PATH, or path to cmake is correctly configured in ~/.config/qi/qibuild.xml

qibuild.cmake.read_cmake_cache(cache_path)

Read a CMakeCache.txt file, returning a dict name -> value