September 2018
Intermediate to advanced
606 pages
14h 32m
English
We will demonstrate OS discovery with a very simple CMakeLists.txt:
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)project(recipe-01 LANGUAGES NONE)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux") message(STATUS "Configuring on/for Linux")elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") message(STATUS "Configuring on/for macOS")elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") message(STATUS "Configuring on/for Windows")elseif(CMAKE_SYSTEM_NAME STREQUAL "AIX") message(STATUS "Configuring on/for IBM AIX")else() message(STATUS "Configuring on/for ${CMAKE_SYSTEM_NAME}")endif() ...Read now
Unlock full access