From 84d4a7ed5b08d6f0254241be94073d4307cb5ddc Mon Sep 17 00:00:00 2001 From: Fumio KANEHIRO Date: Wed, 22 Jun 2016 10:40:08 +0900 Subject: [PATCH] supports trunk version of OpenRTM-aist --- CMakeLists.txt | 3 +++ hrplib/hrpRTM/SimulationExecutionContext.cpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2320bd227..f022e6e9f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -268,6 +268,9 @@ set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS} CACHE STRING "Compile flags for omniORB") # OpenRTM-aist find_package(OpenRTM REQUIRED) +if(EXISTS "${OPENRTM_DIR}/include/openrtm-1.1/rtm/RTObjectStateMachine.h") +add_definitions(-DOPENRTM_VERSION_TRUNK) +endif() set(ADDITIONAL_SYMBOL "") include_directories(${OPENRTM_INCLUDE_DIRS}) link_directories(${OPENRTM_LIBRARY_DIRS}) diff --git a/hrplib/hrpRTM/SimulationExecutionContext.cpp b/hrplib/hrpRTM/SimulationExecutionContext.cpp index 6aaf84594..3a45b72e6 100644 --- a/hrplib/hrpRTM/SimulationExecutionContext.cpp +++ b/hrplib/hrpRTM/SimulationExecutionContext.cpp @@ -1,5 +1,5 @@ #include -#if !defined(OPENRTM_VERSION042) && !defined(OPENRTM_VERSION110) +#if (!defined(OPENRTM_VERSION042) && !defined(OPENRTM_VERSION110)) || defined(OPENRTM_VERSION_TRUNK) #include #endif #include "SimulationExecutionContext.h" @@ -21,7 +21,7 @@ namespace RTC ReturnCode_t SimulationExecutionContext::stop() throw (CORBA::SystemException) { -#if defined(OPENRTM_VERSION042) || defined(OPENRTM_VERSION110) +#if (defined(OPENRTM_VERSION042) || defined(OPENRTM_VERSION110)) && !defined(OPENRTM_VERSION_TRUNK) if (!m_running) return RTC::PRECONDITION_NOT_MET; OpenRTM::ExtTrigExecutionContextService_var extTrigExecContext =