Skip to content

Latest commit

 

History

History

recipe-07

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Probing compiler flags

We show the usage of check_<lang>_compiler_flag (where <lang> can be C, CXX or Fortran) to check for the availability of compiler flags. The example will show how to set compiler flags for the sanitizers (address, memory, thread and undefined behavior) which require the flag to be passed also to the linker. This function is available for Fortran since CMake 3.3.

We will expand on this example in Recipe 3 in Chapter 7