-I and check_cxx_source_compiles

David Faure faure at kde.org
Thu Apr 20 15:42:57 CEST 2006


On Thu, Apr 20, 2006 at 09:28:39AM -0400, William A. Hoffman wrote:
> At 06:11 AM 4/20/2006, David Faure wrote:
> >I'm getting a failure in kdepim's gpgme configure check, because apparently
> >check_cxx_source_compiles ignores CMAKE_REQUIRED_INCLUDES?
> >
> >Indeed http://www.cmake.org/Wiki/CMake_HowToDoPlatformChecks says that it
> >honors CMAKE_REQUIRED_FLAGS, but it doesn't mention something like
> >CMAKE_REQUIRED_INCLUDES.
> >
> >But then instead of doing
> >set(CMAKE_REQUIRED_INCLUDES ${GPGME_INCLUDES})
> >we have to add -I in front of every entry in the include list?
> >Can support for CMAKE_REQUIRED_INCLUDES be added instead?
> >or am I missing something?
> >
> >For reference, I have
> >CMakeCache.txt:GPGME_INCLUDES:INTERNAL=/Users/dfaure/gpgmedir/include;/Users/dfaure/gpgmedir/include
> >which afaik looks correct [the duplicated path is gpgme-config's fault].
> 
> You should not have to add -I flags for this.  I just verified and the following works:
> 
> include(CheckCXXSourceCompiles)
> SET(CMAKE_REQUIRED_INCLUDES /foo/bar;/foo/bill;/foo/3)
> CHECK_CXX_SOURCE_COMPILES("int main() { return 0;}" RESULT)

Thanks; I must have been looking at an older entry in CMakeError.log,
it's working fine now indeed. I have updated the wiki accordingly
(hmm got some antispam response, let's see if that works).

David.



More information about the Kde-buildsystem mailing list