Permalink
Browse files

improvements to r version checking at configure time

  • Loading branch information...
1 parent e2e4f8b commit c7c97d0681d75221b7eede359f6e9ca33fb2e6f3 @jjallaire jjallaire committed Mar 15, 2011
Showing with 17 additions and 4 deletions.
  1. +11 −2 CMakeGlobals.txt
  2. +4 −0 cmake/modules/FindLibR.cmake
  3. +1 −1 package/linux/CMakeLists.txt
  4. +1 −1 src/cpp/CMakeLists.txt
View
13 CMakeGlobals.txt
@@ -58,8 +58,17 @@ endif()
# required R version
set(RSTUDIO_R_MAJOR_VERSION_REQUIRED 2)
-set(RSTUDIO_R_MINOR_VERSION_REQUIRED 10)
-set(RSTUDIO_R_PATCH_VERSION_REQUIRED 0)
+set(RSTUDIO_R_MINOR_VERSION_REQUIRED 11)
+set(RSTUDIO_R_PATCH_VERSION_REQUIRED 1)
+
+# allow opting out of version checking (for building on older distros)
+if(NOT DEFINED RSTUDIO_VERIFY_R_VERSION)
+ if(RSTUDIO_PACKAGE_BUILD)
+ set(RSTUDIO_VERIFY_R_VERSION FALSE)
+ else()
+ set(RSTUDIO_VERIFY_R_VERSION TRUE)
+ endif()
+endif()
# cmake modules (compute path relative to this file)
get_filename_component(ROOT_SRC_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
View
4 cmake/modules/FindLibR.cmake
@@ -162,6 +162,10 @@ find_package_handle_standard_args(LibR DEFAULT_MSG
LIBR_DOC_DIR
)
+if(LIBR_FOUND)
+ message(STATUS "Found R: ${LIBR_HOME}")
+endif()
+
# mark low-level variables from FIND_* calls as advanced
mark_as_advanced(
LIBR_EXECUTABLE
View
2 package/linux/CMakeLists.txt
@@ -51,7 +51,7 @@ set(PACKAGE_LONG_DESCRIPTION "RStudio is a set of integrated tools designed to h
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}\n ${PACKAGE_LONG_DESCRIPTION}")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${PACKAGE_ARCHITECTURE}")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${RSTUDIO_DEBIAN_DEPENDS} libpango1.0-0 (>= 1.14.0)")
-set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "r-base (>= 2.10.0)")
+set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "r-base (>= 2.11.1)")
# rpm-specific
set(CPACK_RPM_PACKAGE_SUMMARY "${CPACK_PACKAGE_NAME}")
View
2 src/cpp/CMakeLists.txt
@@ -142,7 +142,7 @@ endif()
find_package(LibR REQUIRED)
# verify we got the required R version
-if(LIBR_FOUND)
+if(LIBR_FOUND AND RSTUDIO_VERIFY_R_VERSION)
include(CheckCSourceRuns)
set(CMAKE_REQUIRED_INCLUDES ${LIBR_INCLUDE_DIRS})
check_c_source_runs("

0 comments on commit c7c97d0

Please sign in to comment.