diff --git a/Filters/StatisticsGnuR/CMakeLists.txt b/Filters/StatisticsGnuR/CMakeLists.txt index d8789b16e3eb65cbe2cbbe4088dd07089102cb6f..3611702d3cf3cedb06ca662a17852b1327baea9a 100644 --- a/Filters/StatisticsGnuR/CMakeLists.txt +++ b/Filters/StatisticsGnuR/CMakeLists.txt @@ -14,6 +14,8 @@ set(Module_SRCS find_package(R) include_directories(${R_INCLUDE_DIR}) +add_definitions(-DVTK_BUILDING_FILTERS_STATISTICSGNUR) + # Configure the module specific settings into a module configured header. configure_file(${CMAKE_CURRENT_SOURCE_DIR}/vtkFiltersStatisticsGnuRConfigure.h.in ${CMAKE_CURRENT_BINARY_DIR}/vtkFiltersStatisticsGnuRConfigure.h) diff --git a/Filters/StatisticsGnuR/vtkRAdapter.cxx b/Filters/StatisticsGnuR/vtkRAdapter.cxx index 80ef978a15ba7075e4b853db08534cb31a1bf724..aff0c4d820630f9dfa53a98150536e2c886562f7 100644 --- a/Filters/StatisticsGnuR/vtkRAdapter.cxx +++ b/Filters/StatisticsGnuR/vtkRAdapter.cxx @@ -48,6 +48,8 @@ #include <stdio.h> #include <cassert> +#define R_NO_REMAP /* AVOID SOME SERIOUS STUPIDITY. DO NOT REMOVE. */ + #include "R.h" #include "Rdefines.h" #include "R_ext/Parse.h" diff --git a/Filters/StatisticsGnuR/vtkRAdapter.h b/Filters/StatisticsGnuR/vtkRAdapter.h index cf1e61aec7db2f98fb71af247ec4b8f82c23eb04..54a176af550d8a1901a1540e80eb10d57ffadb1e 100644 --- a/Filters/StatisticsGnuR/vtkRAdapter.h +++ b/Filters/StatisticsGnuR/vtkRAdapter.h @@ -49,7 +49,9 @@ #include "vtkFiltersStatisticsGnuRModule.h" // For export macro #include "vtkObject.h" +#ifndef VTK_BUILDING_FILTERS_STATISTICSGNUR #define R_NO_REMAP /* Don't pollute the namespace (some of which conflict). DO NOT REMOVE. */ +#endif #include "Rinternals.h" // Needed for Rinternals.h SEXP data structure