Skip to content
  • Brad King's avatar
    Prefer generic system compilers by default for C, C++, and Fortran · 7e58e5bb
    Brad King authored
    Teach CMake to prefer the system default compiler automatically when no
    compiler is specified.  By default use "cc" for C, "CC" for C++, and
    "f95" for Fortran.  Load a new Platform/<os>-<lang>.cmake module to
    allow each platform to specify for each language its system compiler
    name(s) and/or exclude certain names.
    
    Create Platform/(CYGWIN|Darwin|Linux|Windows)-CXX.cmake modules to
    specify "c++" as the system C++ compiler name for these platforms.  On
    systems that use case-insensitive filesystems exclude C++ compiler names
    that are distinguished from C compiler names only by case.
    
    This will change the default compiler selection for existing build
    scripts that do not specify a compiler when run on machines with
    separate system and GNU compilers both installed in the PATH.  We do not
    make this change in default behavior lightly.  However:
    
    (1) If a given build really needs specific compilers one should specify
        them explicitly e.g. by set...
    7e58e5bb