September 2018
Intermediate to advanced
606 pages
14h 32m
English
We will use both try_compile and check_cxx_source_compiles and compare how the two commands work:
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)project(recipe-06 LANGUAGES CXX)set(CMAKE_CXX_STANDARD 11)set(CMAKE_CXX_EXTENSIONS OFF)set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(OpenMP)if(OpenMP_FOUND) # ... <- the steps below will be placed hereelse() message(STATUS "OpenMP not found: no test for taskloop is run")endif()
Read now
Unlock full access