Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Sep 2012 16:08:18 -1000
From:      Jan Beich <jbeich@tormail.org>
To:        Dimitry Andric <dimitry@andric.com>
Cc:        "freebsd-performance@freebsd.org" <freebsd-performance@freebsd.org>, "O. Hartmann" <ohartman@zedat.fu-berlin.de>, Ports FreeBSD <freebsd-ports@FreeBSD.org>
Subject:   Re: Help. Porting "FreeOCL" fails (atomic_ops.h missing, CLANG++ libc++ issues ...)
Message-ID:  <1TByuW-0000gM-VF@internal.tormail.org>
In-Reply-To: <5048F733.3090301@FreeBSD.org> (Dimitry Andric's message of "Thu,  06 Sep 2012 21:19:15 %2B0200")
References:  <5047659D.8000107@mail.zedat.fu-berlin.de> <50489C47.4040101@FreeBSD.org> <5048EB56.2070402@zedat.fu-berlin.de> <5048F733.3090301@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Dimitry Andric <dim@FreeBSD.org> writes:

> Now, as to how we can convince CMake to put the -I/usr/local/include at
> the end... Maybe we should just patch the CMakeLists.txt, but that is a
> rather ugly solution. :)

Try using

  CPPFLAGS+=		-isystem${LOCALBASE}/include

gcc(1) (and clang) has a flag for systems broken by design:

    -isystem dir
        Search dir for header files, after all directories specified by -I
        but before the standard system directories.  Mark it as a system
        directory, so that it gets the same special treatment as is applied
        to the standard system directories.  If dir begins with "=", then
        the "=" will be replaced by the sysroot prefix; see --sysroot and
        -isysroot.

For example, firefox uses it to avoid picking up lang/spidermonkey headers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1TByuW-0000gM-VF>