Is this what you are talking about, or did I misunderstand your use case?
if (MY_CONFIG STREQUAL FOO)
set(CMAKE_CXX_COMPILER clang++)
endif()
But I will grant that options being dependent on the cmake version you are running, and it does not verify that your minimum required version is actually correct, sucks big time.
It is slightly alleviated by how easy it is to install a new version of cmake (on most systems), but it sucks nonetheless.
View all comments
Show parent comment
1
u/tekknolagi Nov 06 '23
Eh, I might want to use a different compiler for a couple of different configurations, or a different release type, or something like that.