~l3on/ubuntu/precise/rkward/rebuild1

« back to all changes in this revision

Viewing changes to rkward/rbackend/FindR.cmake

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Friedrichsmeier
  • Date: 2010-10-04 14:30:00 UTC
  • mfrom: (12.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20101004143000-qey73molmxxwy4w6
Tags: 0.5.4-1
* new upstream release
* bump standards version to 3.9.1 (no changes needed)
* no more need to remove svncopy.sh-script in rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
MESSAGE(STATUS "Looking for R include files")
34
34
IF(NOT R_INCLUDEDIR)
35
 
        IF(WIN32)       # This version of the test will not work with R < 2.9.0, but the other version (in the else part) will not work on windows (and on windows the paths are generally standard, anyway).
 
35
        IF(WIN32 OR APPLE)      # This version of the test will not work with R < 2.9.0, but the other version (in the else part) will not work on windows or apple (but we do not really need to support ancient versions of R, there).
36
36
                EXECUTE_PROCESS(
37
37
                        COMMAND ${R_EXECUTABLE} "--slave" "--no-save" "-e" "cat(R.home('include'))"
38
38
                        OUTPUT_VARIABLE R_INCLUDEDIR)
39
 
        ELSE(WIN32)
 
39
        ELSE(WIN32 OR APPLE)
40
40
                EXECUTE_PROCESS(
41
41
                        COMMAND ${R_EXECUTABLE} CMD sh -c "echo -n $R_INCLUDE_DIR"
42
42
                        OUTPUT_VARIABLE R_INCLUDEDIR)
43
 
        ENDIF(WIN32)
 
43
        ENDIF(WIN32 OR APPLE)
44
44
ELSE(NOT R_INCLUDEDIR)
45
45
        MESSAGE(STATUS "Location specified by user")
46
46
ENDIF(NOT R_INCLUDEDIR)
94
94
ELSE(NOT LIBR_LAPACK)
95
95
        MESSAGE(STATUS "Yes, ${LIBR_LAPACK} exists")
96
96
        SET(R_USED_LIBS ${R_USED_LIBS} Rlapack)
97
 
        IF(NOT WIN32)
 
97
        IF(WIN32 OR APPLE)
 
98
        ELSE(WIN32 OR APPLE)
98
99
                # needed when linking to Rlapack on linux for some unknown reason.
99
100
                # apparently not needed on windows (let's see, when it comes back to bite us, though)
100
101
                # and compiling on windows is hard enough even without requiring libgfortran, too.
101
102
                SET(R_USED_LIBS ${R_USED_LIBS} gfortran)
102
 
        ENDIF(NOT WIN32)
 
103
        ENDIF(WIN32 OR APPLE)
103
104
ENDIF(NOT LIBR_LAPACK)
104
105
 
105
106
# for at least some versions of R, we seem to have to link against -lRlapack. Else loading some