From e1c2e72ed6cfe7c4cbe7dc09e845e4ad17d24f56 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Mon, 5 Jul 2010 20:50:29 +0000 Subject: [PATCH] temporarily turned off PCH support for GCC 4.1, since it causes "undefined main" error --- OpenCVPCHSupport.cmake | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/OpenCVPCHSupport.cmake b/OpenCVPCHSupport.cmake index 8061f69cd5..de74e7262d 100644 --- a/OpenCVPCHSupport.cmake +++ b/OpenCVPCHSupport.cmake @@ -19,23 +19,23 @@ 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,2-9]\\.[0-9]") SET(PCHSupport_FOUND TRUE) - ELSE(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]") + ELSE() 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() + ENDIF() SET(_PCH_include_prefix "-I") -ELSE(CMAKE_COMPILER_IS_GNUCXX) +ELSE() IF(WIN32) SET(PCHSupport_FOUND TRUE) # for experimental msvc support SET(_PCH_include_prefix "/I") - ELSE(WIN32) + ELSE() SET(PCHSupport_FOUND FALSE) - ENDIF(WIN32) + ENDIF() ENDIF(CMAKE_COMPILER_IS_GNUCXX) @@ -52,9 +52,9 @@ MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags) LIST(APPEND ${_out_compile_flags} "${${_out_compile_flags}} -fPIC") ENDIF() - ELSE(CMAKE_COMPILER_IS_GNUCXX) + ELSE() ## TODO ... ? or does it work out of the box - ENDIF(CMAKE_COMPILER_IS_GNUCXX) + ENDIF() GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES ) FOREACH(item ${DIRINC})