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

fix CMake compiler detection #113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kociap
Copy link
Collaborator

@kociap kociap commented Nov 30, 2024

When compiling on Linux, CMake may use the c++ compiler, which usually defaults to GNU g++, and set the CMAKE_CXX_COMPILER variable accordingly. The current method fails to recognise the compiler being used and does not set appropriate options.

The CMAKE_CXX_COMPILER_ID variable correctly recognises the compiler vendor.

CMakeLists.txt Outdated
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if(CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU")
set(VUK_COMPILER_CLANGPP ON)
elseif(CMAKE_CXX_COMPILER_FRONTEND_VARINT STREQUAL "MSVC")
Copy link
Owner

@martty martty Nov 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix this typo (VARINT)

When compiling on Linux, CMake may use the `c++` compiler, which usually
defaults to GNU g++, and set the CMAKE_CXX_COMPILER variable
accordingly. The current method fails to recognise the compiler being
used and does not set appropriate options.

The CMAKE_CXX_COMPILER_ID variable correctly recognises the compiler
vendor.
@kociap kociap force-pushed the kociap/compiler-detection branch from 6119a13 to 984270e Compare November 30, 2024 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants