Revision: 8994
http://playerstage.svn.sourceforge.net/playerstage/?rev=8994&view=rev
Author: hsujohnhsu
Date: 2010-12-02 05:49:16 +0000 (Thu, 02 Dec 2010)
Log Message:
-----------
update parallel_quickstep auto find
Modified Paths:
--------------
code/gazebo/branches/wg/cmake/SearchForStuff.cmake
code/gazebo/branches/wg/gazebo_config.h.in
code/gazebo/branches/wg/server/physics/CMakeLists.txt
code/gazebo/branches/wg/server/physics/ode/ODEPhysics.cc
code/gazebo/branches/wg/server/physics/ode/ODEPhysics.hh
Modified: code/gazebo/branches/wg/cmake/SearchForStuff.cmake
===================================================================
--- code/gazebo/branches/wg/cmake/SearchForStuff.cmake 2010-12-02 04:47:04 UTC
(rev 8993)
+++ code/gazebo/branches/wg/cmake/SearchForStuff.cmake 2010-12-02 05:49:16 UTC
(rev 8994)
@@ -19,6 +19,7 @@
set (parallel_quickstep_include_dirs "" CACHE STRING "parallel_quickstep CUDA
include paths. Use this to override automatic detection.")
set (parallel_quickstep_library_dirs "" CACHE STRING "parallel_quickstep CUDA
library paths. Use this to override automatic detection.")
+set (parallel_quickstep_library "" CACHE STRING "parallel_quickstep CUDA
library names. Use this to override automatic detection.")
set (parallel_quickstep_lflags "" CACHE STRING "parallel_quickstep CUDA lflags
Use this to override automatic detection.")
set (parallel_quickstep_cflags "" CACHE STRING "parallel_quickstep CUDA cflags
Use this to override automatic detection.")
@@ -639,9 +640,38 @@
endif (NOT BULLET_DOUBLE_PRECISION)
endif (INCLUDE_BULLET)
+########################################
+# Find parallel_quickstep
STRING(REPLACE " " ";" parallel_quickstep_include_dirs_split
"${parallel_quickstep_include_dirs}")
STRING(REPLACE " " ";" parallel_quickstep_library_dirs_split
"${parallel_quickstep_library_dirs}")
set( CMAKE_REQUIRED_INCLUDES ${parallel_quickstep_include_dirs_split} )
-set( CMAKE_REQUIRED_LIBRARIES parallel_quickstep )
+set( CMAKE_REQUIRED_LIBRARIES ${parallel_quickstep_library} )
set( CMAKE_REQUIRED_FLAGS ${parallel_quickstep_lflags} )
+#STRING(REPLACE " " "/parallel_quickstep " parallel_quickstep_include_dirs_tmp
"${parallel_quickstep_include_dirs}")
+find_path(parallel_quickstep_include_found
parallel_quickstep/parallel_quickstep.h '${parallel_quickstep_include_dirs}')
+if (NOT parallel_quickstep_include_found)
+ message (STATUS "Looking for parallel_quickstep.h in
${parallel_quickstep_include_dirs} - not found")
+ BUILD_WARNING ("parallel_quickstep.h not found, plugins will not be
supported.")
+else (NOT parallel_quickstep_include_found)
+ message (STATUS "Looking for parallel_quickstep.h - found")
+endif (NOT parallel_quickstep_include_found)
+
+find_library(parallel_quickstep_library_found parallel_quickstep
${parallel_quickstep_library_dirs})
+if (NOT parallel_quickstep_library_found)
+ message (STATUS "Looking for libparallel_quickstep.so in
${parallel_quickstep_library_dirs} - not found")
+ BUILD_WARNING ("libparallel_quickstep.so not found, parallel_quickstep will
not be supported.")
+else (NOT parallel_quickstep_library_found)
+ message (STATUS "Looking for libparallel_quickstep.so - found")
+endif (NOT parallel_quickstep_library_found)
+
+if (parallel_quickstep_library_found AND parallel_quickstep_include_found)
+
+ SET (PARALLEL_QUICKSTEP ON CACHE BOOL "Build gazebo with parallel_quickstep
support" FORCE)
+
+else (parallel_quickstep_library_found AND parallel_quickstep_include_found)
+
+ SET (PARALLEL_QUICKSTEP OFF CACHE BOOL "Build gazebo without
parallel_quickstep support" FORCE)
+
+endif (parallel_quickstep_library_found AND parallel_quickstep_include_found)
+
Modified: code/gazebo/branches/wg/gazebo_config.h.in
===================================================================
--- code/gazebo/branches/wg/gazebo_config.h.in 2010-12-02 04:47:04 UTC (rev
8993)
+++ code/gazebo/branches/wg/gazebo_config.h.in 2010-12-02 05:49:16 UTC (rev
8994)
@@ -16,5 +16,6 @@
#cmakedefine INCLUDE_ODE 1
#cmakedefine INCLUDE_ODE_JOINT_DAMPING 1
#cmakedefine QUICKSTEP_EXPERIMENTAL 1
+#cmakedefine PARALLEL_QUICKSTEP 1
#cmakedefine INCLUDE_RTSHADER 1
#cmakedefine ENABLE_TIMERS 1
Modified: code/gazebo/branches/wg/server/physics/CMakeLists.txt
===================================================================
--- code/gazebo/branches/wg/server/physics/CMakeLists.txt 2010-12-02
04:47:04 UTC (rev 8993)
+++ code/gazebo/branches/wg/server/physics/CMakeLists.txt 2010-12-02
05:49:16 UTC (rev 8994)
@@ -69,7 +69,7 @@
)
add_library(gazebo_physics SHARED ${sources})
-target_link_libraries(gazebo_physics parallel_quickstep ${LINK_LIBS} )
+target_link_libraries(gazebo_physics ${parallel_quickstep_library}
${LINK_LIBS} )
if (CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE})
set_source_files_properties(${sources} PROPERTIES LINK_FLAGS
${CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE}})
Modified: code/gazebo/branches/wg/server/physics/ode/ODEPhysics.cc
===================================================================
--- code/gazebo/branches/wg/server/physics/ode/ODEPhysics.cc 2010-12-02
04:47:04 UTC (rev 8993)
+++ code/gazebo/branches/wg/server/physics/ode/ODEPhysics.cc 2010-12-02
05:49:16 UTC (rev 8994)
@@ -56,6 +56,8 @@
#include "ODEHeightmapShape.hh"
#include "MapShape.hh"
+#include "gazebo_config.h"
+
#include "ODEPhysics.hh"
using namespace gazebo;
@@ -415,8 +417,10 @@
dWorldQuickStep(this->worldId, (**this->stepTimeP).Double());
else if (**this->stepTypeP == "world")
dWorldStep( this->worldId, (**this->stepTimeP).Double() );
+#ifdef PARALLEL_QUICKSTEP
else if (**this->stepTypeP == "parallel_quick")
dWorldParallelQuickStep(this->worldId, (**this->stepTimeP).Double());
+#endif
else
gzthrow(std::string("Invalid step type[") + **this->stepTypeP);
Modified: code/gazebo/branches/wg/server/physics/ode/ODEPhysics.hh
===================================================================
--- code/gazebo/branches/wg/server/physics/ode/ODEPhysics.hh 2010-12-02
04:47:04 UTC (rev 8993)
+++ code/gazebo/branches/wg/server/physics/ode/ODEPhysics.hh 2010-12-02
05:49:16 UTC (rev 8994)
@@ -28,7 +28,6 @@
#define ODEPHYSICS_HH
#include <ode/ode.h>
-#include <parallel_quickstep/parallel_quickstep.h>
#include "gazebo_config.h"
@@ -42,6 +41,10 @@
#include <boost/thread/thread.hpp>
#include <boost/thread/mutex.hpp>
+#ifdef PARALLEL_QUICKSTEP
+#include <parallel_quickstep/parallel_quickstep.h>
+#endif
+
namespace gazebo
{
class Entity;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit