After you clone this, run the following commands:
$ mkdir build && cd build
$ cmake ..
$ make
and observe that the executable is made.$ make test
Bonus Points
- Make a test that actually does something.
cmake_minimum_required(VERSION 2.8) | |
project(CTest-Example) | |
add_executable(CTest-Example CTest-Example) | |
enable_testing() | |
add_test(NAME YeahhhTest COMMAND ${CMAKE_COMMAND} -E echo 'Yeahh') |
#include <iostream> | |
int main() | |
{ | |
std::cout << "This is the whole thing." << std::endl; | |
} |