Hi Nick,

On 6 May 2014 17:26, Trajce Nikolov NICK <trajce.nikolov.n...@gmail.com> wrote:
> Hi Robert,
>
> here is the log
>
> cd /home/ubuntu/OpenSceneGraph/src/OpenThreads/pthreads && /usr/bin/c++
> -DHAVE_PTHREAD_CANCEL -DHAVE_PTHREAD_SETCANCELSTATE
> -DHAVE_PTHREAD_TESTCANCEL -DHAVE_SCHED_YIELD
> -DHAVE_THREE_PARAM_SCHED_SETAFFINITY -DOPENTHREADS_EXPORTS
> -DOpenThreads_EXPORTS -D_GNU_SOURCE -Wall -Wparentheses -Wno-long-long
> -Wno-import -pedantic -Wreturn-type -Wmissing-braces -Wunknown-pragmas
> -Wunused -O3 -DNDEBUG -fPIC -I/home/ubuntu/OpenSceneGraph/include

This mean CMake is detecting the features.

> As I mentioned earlier ALLOW_PRIORITY_SCHEDULING is not set anywhere - I
> examined the CMakeLists.txt for pthreads. But it is used in the code right
> in places where the priority is set. Also these __linux and __linux__ .. are
> these system wide defined by default? I am using QT Creator as an editor and
> seeing these grayed out


Curious.  I did a quick search and came across the page:

   sourceforge.net/p/predef/wiki/OperatingSystems/

The suggests __linux is obsolete, so __linux__ should be the one we
should use.  I replaced the one instance where __linux was used with
the __linux__ version and checked this in to svn/trunk.

The ALLOW_PRIORITY_SCHEDULING one is more odd.  I can't find a
reference in the ALLOW_PRIORITY_SCHEDULING in anywhere in the
OpenThreads code base apart from where it's used in
OpenThreads/pthreads, so it's used by not defined.  I seems like Cmake
should be added this option via another -D entry but isn't.  I don't
recall the submission that introduced this, it might be worth stepping
back through the svn logs to see the author of this specific addition
and bring them into the discussion. It could be that this was missed
with integration of Cmake or similar changes.

FYI, I'm not the author of OpenThreads, just ended up the defacto
caretaker as the original author stepped back.  This means I'm similar
situation to others - I read the code, work out what it supposed to do
and make correction or merge fixes that look appropriate.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to