Week 8 Class 21 Mon Oct 12 Posted: Oct 12

Class session:

  1. Exercise 48:

    Quite a few have not created their markturn repositories. In order for me to add pull requests, you need to create the initial repository.

    Consider this as an exercise due by 2 pm of Mon, Oct 12.

    If you already created the repository, there is nothing you need to do to get credit for this exercise.

  2. Screencast: ctest

    Docker Bash Completion on Linux

    Docker Bash Completion on Mac


  3. Exercise 49: Demo CMake File

    If you are writing a program and go to use part of an API that you are not sure about, you can add it to your program and write a series of output statements (or assertions) to check the results. The problem with this is that it makes the overall program more complicated. It is easy to get confused because you are mixing the large program’s behavior with understanding the API’s behavior. The behavior that you observe is dependent on the behavior of the large program and the behavior of the API you are trying to use. In good design we try to isolate dependencies.

    So when I investigate or present parts of an API, I write small, focused programs whose only purpose is to use the API. For example, if I am not sure how a particular part of std::vector works, I write a small C++ program to try it.

    We can do the same with CMake. Below is the start of a small demo program for get_filename_component().

    Create an empty directory, copy this file into it, and run cmake. You can even run cmake “in-source” because there is not any “source”.

    For this exercise, finish this demo example for all options of get_filename_component(). Replace the hard-coded filename with the filename from the crossword questions in Exercise 50.

    Upload your CMakeLists.txt to DevOps Exercises 49: Demo CMake File

  4. Exercise 50: ctest Crossword

    Crossword answers can include underscores (‘_’) for multi-part names, and slashes (‘/’) and periods (‘.’) for filenames.

  5. Screencast: ctest Example Part I

Screencast Folder: Class 21 Mon Oct 12

Exercise Due Date: 4 pm on Tuesday, Oct 13