Skip to content

Commit

Permalink
Merge pull request #164 from oxfordcontrol/solaris
Browse files Browse the repository at this point in the history
fix for CRAN/solaris
  • Loading branch information
bstellato committed Aug 26, 2019
2 parents be4ff02 + 71cca7b commit cd260ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion configure/cmake/FindR.cmake
Expand Up @@ -11,12 +11,16 @@ set(CMAKE_FIND_APPBUNDLE "NEVER")
find_program(R_EXEC NAMES R R.exe)
set(CMAKE_FIND_APPBUNDLE ${TEMP_CMAKE_FIND_APPBUNDLE})


#---Find includes and libraries if R exists
if(R_EXEC)

set(R_FOUND TRUE)

if((CMAKE_HOST_SOLARIS) AND (DEFINED ENV{R_HOME}))
message(STATUS "Unsetting R_HOME on Solaris.")
unset(ENV{R_HOME})
endif()

execute_process(WORKING_DIRECTORY .
COMMAND ${R_EXEC} RHOME
OUTPUT_VARIABLE R_ROOT_DIR
Expand Down

0 comments on commit cd260ee

Please sign in to comment.