September 2018
Intermediate to advanced
606 pages
14h 32m
English
This is how we can use the set_compiler_flag function in our CMakeLists.txt:
cmake_minimum_required(VERSION 3.5 FATAL_ERROR) project(recipe-03 LANGUAGES C CXX)
include(set_compiler_flag.cmake)
set_compiler_flag( working_compile_flag C REQUIRED "-foo" # this should fail "-wrong" # this should fail "-wrong" # this should fail "-Wall" # this should work with GNU "-warn all" # this should work with Intel "-Minform=inform" # this should work with PGI "-nope" # this should fail )message(STATUS "working C compile ...
Read now
Unlock full access