Fixed precompiled headers build on Linux
This commit is contained in:
parent
47a4e87784
commit
ffa44fb114
@ -24,10 +24,12 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
SET(_PCH_include_prefix "-I")
|
SET(_PCH_include_prefix "-I")
|
||||||
|
SET(_PCH_isystem_prefix "-isystem")
|
||||||
|
|
||||||
ELSEIF(WIN32)
|
ELSEIF(WIN32)
|
||||||
SET(PCHSupport_FOUND TRUE) # for experimental msvc support
|
SET(PCHSupport_FOUND TRUE) # for experimental msvc support
|
||||||
SET(_PCH_include_prefix "/I")
|
SET(_PCH_include_prefix "/I")
|
||||||
|
SET(_PCH_isystem_prefix "/I")
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(PCHSupport_FOUND FALSE)
|
SET(PCHSupport_FOUND FALSE)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
@ -50,7 +52,11 @@ MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
|
|||||||
|
|
||||||
GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES )
|
GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES )
|
||||||
FOREACH(item ${DIRINC})
|
FOREACH(item ${DIRINC})
|
||||||
LIST(APPEND ${_out_compile_flags} "${_PCH_include_prefix}\"${item}\"")
|
if(item MATCHES "^${OpenCV_SOURCE_DIR}/modules/")
|
||||||
|
LIST(APPEND ${_out_compile_flags} "${_PCH_include_prefix}\"${item}\"")
|
||||||
|
else()
|
||||||
|
LIST(APPEND ${_out_compile_flags} "${_PCH_isystem_prefix}\"${item}\"")
|
||||||
|
endif()
|
||||||
ENDFOREACH(item)
|
ENDFOREACH(item)
|
||||||
|
|
||||||
GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS)
|
GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS)
|
||||||
|
@ -41,9 +41,6 @@
|
|||||||
#ifndef GTEST_USES_POSIX_RE
|
#ifndef GTEST_USES_POSIX_RE
|
||||||
# define GTEST_USES_POSIX_RE 0
|
# define GTEST_USES_POSIX_RE 0
|
||||||
#endif
|
#endif
|
||||||
// #ifdef __GNUC__
|
|
||||||
// # pragma GCC diagnostic ignored "-Wmissing-declarations"
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
#include "opencv2/core/core.hpp"
|
#include "opencv2/core/core.hpp"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user