Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding compiler detection in CMakeLists.txt #24

Open
gbowne1 opened this issue Mar 21, 2024 · 0 comments
Open

Consider adding compiler detection in CMakeLists.txt #24

gbowne1 opened this issue Mar 21, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Milestone

Comments

@gbowne1
Copy link
Owner

gbowne1 commented Mar 21, 2024

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.

@gbowne1 gbowne1 added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Mar 21, 2024
@gbowne1 gbowne1 added this to the Builds milestone Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
Status: No status
Development

No branches or pull requests

1 participant