From 58ae8714ff5f7f07abcfcbb6433f1a27cae0a370 Mon Sep 17 00:00:00 2001 From: Matthew-Supernaw-NOAA Date: Wed, 11 Oct 2023 13:17:24 -0400 Subject: [PATCH] Update CMakeLists.txt --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e2be558..90f9d67b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,10 +22,10 @@ MESSAGE(STATUS "R_EXECUTABLE is ${R_EXECUTABLE}") -EXECUTE_PROCESS( - COMMAND ${R_EXECUTABLE} "--slave" "--no-save" "-e" "cat(R.home())" - OUTPUT_VARIABLE R_HOME - OUTPUT_STRIP_TRAILING_WHITESPACE) +execute_process( + COMMAND ${R_EXECUTABLE} "--slave" "--no-save" "-e" "cat(Sys.getenv('R_HOME'))" + OUTPUT_VARIABLE R_HOME +) MESSAGE(STATUS "R_HOME is ${R_HOME}")