Only attempt to use precompiled headers that exists

This commit is contained in:
Roland Kaufmann
2013-02-23 00:58:18 +01:00
parent a35e0d23e3
commit 8b13ffee6b

View File

@@ -97,6 +97,11 @@ function (precompile_header
else (language STREQUAL "CXX")
message (FATAL "Only C or C++ can have precompiled headers")
endif (language STREQUAL "CXX")
# if no precompiled header was found, then we shouldn't do anything here
if (NOT header)
return ()
endif (NOT header)
# only support precompiled headers if the compiler is gcc >= 3.4
get_gcc_version (${language} GCC_VERSION)