Skip to content

Consider adding compiler detection in CMakeLists.txt #24

@gbowne1

Description

@gbowne1

Consider adding compiler detection, because not everyone may have GCC C++ compilers installed..

# Check for Clang compiler
if(CMAKE_CXX_COMPILER_IS_CLANG)
  message(STATUS "C++ compiler: Clang++/LLVM")
  # Set compiler specific flags here (optional)
endif()

# Check for GCC compiler
if(CMAKE_COMPILER_IS_GNU)
  message(STATUS "C++ compiler: g++")
  # Set compiler specific flags here (optional)
endif()

Also could make a toolchain file.

Use the CMAKE_TOOLCHAIN_FILE variable to specify different toolchain files for each platform (Windows, Linux, etc.) and various compilers. These files define compiler paths and flags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Ready

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions