What is the correct way to check if the GCC compiler is under Cmake?
I saw like if(CMAKE_COMPILER_IS_GNUCC)and if(CMAKE_COMPILER_IS_GNUXX), but none of them are defined when I run cmake. To be clear, I am 100% sure that I am using GCC.
I just want to add compiler flags for GCC. I used to just use a sentence elseafter checking windows, but now I want to be more general.
source
share