« Prev 4.2 Configuring the Project | Table of Contents | Next » 4.2.2 Checking for a Header File |
The following methods can be used within a configure
block to check for a
working compiler:
check_c_compiler
check_cxx_compiler
check_d_compiler
Each of these methods can take an optional list of compilers to check for. If such a list is supplied, the compilers are tested in the order listed. The first compiler option found which passes a compilation test is used.
Here are example calls which also show the default compiler list for each supported language:
configure do check_c_compiler "gcc", "clang" check_cxx_compiler "g++", "clang++" check_d_compiler "gdc", "ldc2" end
Global configuration options may be supplied to the compiler checks as well. Example:
configure do check_c_compiler "x86_64-elf-gcc", on_fail: "Install x86_64-elf cross toolchain first!" end
« Prev 4.2 Configuring the Project | Table of Contents | Next » 4.2.2 Checking for a Header File |