[Cmake] Can I use CMAKE_COMPILER_IS_GNUCXX

Ian Scott ian . m . scott at stud . man . ac . uk
Tue, 17 Sep 2002 17:48:55 +0100


I need to set a specific flag for a specific file for a specific compiler

The closest I can get is

IF (CMAKE_COMPILER_IS_GNUCXX)

SET_SOURCE_FILES_PROPERTIES(Templates/vsl_vector_io+vcl_vector_vcl_vector_vn
l_vector~-.cxx COMPILE_FLAGS -ftemplate-depth-25)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)

However, CMAKE_COMPILER_IS_GNUCXX is an internal variable. Does that mean
that I shouldn't use it - will it change between versions? If so is there
some better way of determining if gcc is being used?

Ian.