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

PROTON-2786: Don't reuse possibly incorrect CMAKE_CXX_COMPILER value determined by check_language(CXX) #415

Merged
merged 1 commit into from
Dec 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,12 @@ set (C_EXTENDED_FLAGS ${C_EXTENDED_${CMAKE_C_COMPILER_ID}})
## C++
check_language (CXX)
if (CMAKE_CXX_COMPILER)
# check_language(CXX) does not handle compiler parameters in CXX env variable well
# forget the result of the check and let enable_language(CXX) to do this correctly
unset(CMAKE_CXX_COMPILER)
unset(CMAKE_CXX_COMPILER CACHE)
enable_language(CXX)

# This effectively checks for cmake version 3.1 or later
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
Expand Down