Browse Source

HPCC-11394 Support latest version of Rcpp

Previous fix gave some issues on Centos builds

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 11 years ago
parent
commit
0b02ab8b6a
2 changed files with 5 additions and 0 deletions
  1. 3 0
      plugins/Rembed/CMakeLists.txt
  2. 2 0
      plugins/Rembed/Rembed.cpp

+ 3 - 0
plugins/Rembed/CMakeLists.txt

@@ -43,6 +43,9 @@ if (USE_RINSIDE)
         )
 
     ADD_DEFINITIONS( -D_USRDLL -DREMBED_EXPORTS )
+    if (RCPP_LIBRARY STREQUAL "")
+      ADD_DEFINITIONS( -DRCPP_HEADER_ONLY )
+    endif()
 
     HPCC_ADD_LIBRARY( Rembed SHARED ${SRCS} )
     if (${CMAKE_VERSION} VERSION_LESS "2.8.9")

+ 2 - 0
plugins/Rembed/Rembed.cpp

@@ -17,6 +17,7 @@
 
 #include "platform.h"
 
+#ifdef RCPP_HEADER_ONLY
 // NOTE - these symbols need to be hidden from being exported from the Rembed .so file as RInside tries to dynamically
 // load them from Rcpp.so
 
@@ -51,6 +52,7 @@
 #define reset_current_error HIDE_RCPP_reset_current_error
 #define error_occured HIDE_RCPP_error_occured
 #define rcpp_get_current_error HIDE_RCPP_rcpp_get_current_error
+#endif
 
 #include "RInside.h"