September 2018
Intermediate to advanced
606 pages
14h 32m
English
Step by step, this is how to write CMakeLists.txt to accomplish our task:
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)project(recipe-06 LANGUAGES NONE)find_package(PythonInterp REQUIRED)
enable_testing()add_test(example ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test.py)set_tests_properties(example PROPERTIES WILL_FAIL true)
$ mkdir -p build$ cd build$ cmake ..$ cmake --build .$ ctestTest project /home/user/cmake-recipes/chapter-04/recipe-06/example/build ...
Read now
Unlock full access