diff options
author | Kars de Jong <kars.dejong@locamation.nl> | 2015-08-13 11:33:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-08-13 15:07:03 (GMT) |
commit | 6699834d6298eabe53f2c15d051fbe16cc9014c3 (patch) | |
tree | 1c93d705bb8d588e13fd83e4d047aae6edcd2429 /Modules/Compiler/GNU-DetermineCompiler.cmake | |
parent | fb3035a92c9c7038d0c5fdc3fd8268ac371d673b (diff) | |
download | CMake-6699834d6298eabe53f2c15d051fbe16cc9014c3.zip CMake-6699834d6298eabe53f2c15d051fbe16cc9014c3.tar.gz CMake-6699834d6298eabe53f2c15d051fbe16cc9014c3.tar.bz2 |
GNU-DetermineCompiler: Add support for very old versions of GCC
Very old versions of gcc (2.3.1) do not define __GNUC_MINOR__.
Signed-off-by: Kars de Jong <kars.dejong@locamation.nl>
Diffstat (limited to 'Modules/Compiler/GNU-DetermineCompiler.cmake')
-rw-r--r-- | Modules/Compiler/GNU-DetermineCompiler.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/Compiler/GNU-DetermineCompiler.cmake b/Modules/Compiler/GNU-DetermineCompiler.cmake index 261f148..6ddc566 100644 --- a/Modules/Compiler/GNU-DetermineCompiler.cmake +++ b/Modules/Compiler/GNU-DetermineCompiler.cmake @@ -3,7 +3,9 @@ set(_compiler_id_pp_test "defined(__GNUC__)") set(_compiler_id_version_compute " # define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__GNUC__) -# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__GNUC_MINOR__) +# if defined(__GNUC_MINOR__) +# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__GNUC_MINOR__) +# endif # if defined(__GNUC_PATCHLEVEL__) # define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__GNUC_PATCHLEVEL__) # endif") |