Permalink
Browse files

[12586] Fixed issue with PCH not working on some versions of GCC

Since some versions of GCC doesn't output patchlevel on -dumpversion the PCH check can fail.
Bug: cmangos/issues#81
  • Loading branch information...
1 parent fa27056 commit 1edf404f2dc0d5cca91e550dec77626c23fd75e8 @sikevux sikevux committed with rsa Jun 29, 2013
Showing with 6 additions and 6 deletions.
  1. +5 −5 cmake/FindPCHSupport.cmake
  2. +1 −1 src/shared/revision_nr.h
View
@@ -17,13 +17,13 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
OUTPUT_VARIABLE gcc_compiler_version)
#MESSAGE("GCC Version: ${gcc_compiler_version}")
- IF(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]")
+ IF(gcc_compiler_version MATCHES "4\\.[0-9](\\.[0-9])?")
SET(PCHSupport_FOUND TRUE)
- ELSE(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]")
- IF(gcc_compiler_version MATCHES "3\\.4\\.[0-9]")
+ ELSE(gcc_compiler_version MATCHES "4\\.[0-9](\\.[0-9])?")
+ IF(gcc_compiler_version MATCHES "3\\.4(\\.[0-9])?")
SET(PCHSupport_FOUND TRUE)
- ENDIF(gcc_compiler_version MATCHES "3\\.4\\.[0-9]")
- ENDIF(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]")
+ ENDIF(gcc_compiler_version MATCHES "3\\.4(\\.[0-9])?")
+ ENDIF(gcc_compiler_version MATCHES "4\\.[0-9](\\.[0-9])?")
SET(_PCH_include_prefix "-I")
View
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
- #define REVISION_NR "12584"
+ #define REVISION_NR "12586"
#endif // __REVISION_NR_H__

0 comments on commit 1edf404

Please sign in to comment.