From 55150a8242a5e17ad850ba6d4d24210bccbd9c61 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 25 Oct 2015 15:11:27 +0100 Subject: [PATCH 1/2] Fixed: GCC 5 version check fails for PCH support --- code/CMakeModules/PCHSupport.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/CMakeModules/PCHSupport.cmake b/code/CMakeModules/PCHSupport.cmake index c81e88a5d..005d430d2 100644 --- a/code/CMakeModules/PCHSupport.cmake +++ b/code/CMakeModules/PCHSupport.cmake @@ -16,9 +16,9 @@ ELSE() ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion OUTPUT_VARIABLE gcc_compiler_version) - IF(gcc_compiler_version MATCHES "^4\\.1(\\.[0-9]+)?") + IF(gcc_compiler_version VERSION_LESS "4.2") SET(PCHSupport_FOUND FALSE) - ELSEIF(gcc_compiler_version MATCHES "^4\\.[0-9]+(\\.[0-9]+)?") + ELSE() SET(PCHSupport_FOUND TRUE) ENDIF() ELSE() From e436b954d0d2f1b3823f763758b19f120df7488b Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 25 Oct 2015 15:16:29 +0100 Subject: [PATCH 2/2] Fixed: Don't add dependency on target revision if not defined --- code/CMakeModules/nel.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index 52ee640e9..a4561c677 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -102,10 +102,10 @@ ENDMACRO(NL_TARGET_DRIVER) # Argument: ### MACRO(NL_DEFAULT_PROPS name label) - IF(HAVE_REVISION_H) + IF(TARGET revision) # explicitly say that the target depends on revision.h ADD_DEPENDENCIES(${name} revision) - ENDIF(HAVE_REVISION_H) + ENDIF() # Note: This is just a workaround for a CMake bug generating VS10 files with a colon in the project name. # CMake Bug ID: http://www.cmake.org/Bug/view.php?id=11819