Getting ready

Our example C++ source file (processor-info.cpp) consists of the following:

#include "config.h"#include <cstdlib>#include <iostream>int main() {  std::cout << "Number of logical cores: "            << NUMBER_OF_LOGICAL_CORES << std::endl;  std::cout << "Number of physical cores: "            << NUMBER_OF_PHYSICAL_CORES << std::endl;  std::cout << "Total virtual memory in megabytes: "            << TOTAL_VIRTUAL_MEMORY << std::endl;  std::cout << "Available virtual memory in megabytes: "            << AVAILABLE_VIRTUAL_MEMORY << std::endl;  std::cout << "Total physical memory in megabytes: "            << TOTAL_PHYSICAL_MEMORY << std::endl;  std::cout << "Available physical memory in megabytes: "            << AVAILABLE_PHYSICAL_MEMORY << std::endl;  std::cout << "Processor is 64Bit: " << IS_64BIT ...

Get CMake Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.