diff options
author | xantares <xantares09@hotmail.com> | 2014-04-19 19:03:14 +0200 |
---|---|---|
committer | xantares <xantares09@hotmail.com> | 2014-04-19 19:03:14 +0200 |
commit | 70a60d8a3d6a2160f45cd0083e243273af49db68 (patch) | |
tree | 790437bb69229fb9417890ef620f2866065377a8 | |
parent | ad49296fbd7bc0673971c27ca2ef340782b0196c (diff) | |
download | swig-70a60d8a3d6a2160f45cd0083e243273af49db68.tar.gz |
Try to get R working :[
-rw-r--r-- | Examples/test-suite/CMakeLists.txt | 25 | ||||
-rw-r--r-- | Examples/test-suite/r/CMakeLists.txt | 24 |
2 files changed, 39 insertions, 10 deletions
diff --git a/Examples/test-suite/CMakeLists.txt b/Examples/test-suite/CMakeLists.txt index 76bc2c346..136cb6278 100644 --- a/Examples/test-suite/CMakeLists.txt +++ b/Examples/test-suite/CMakeLists.txt @@ -396,7 +396,7 @@ set ( CPP_TEST_CASES wrapmacro) # TODO: remove me, for test! -set (CPP_TEST_CASES aggregate abstract_access array_member bools casts varargs_overload virtual_destructor) +set (CPP_TEST_CASES integers aggregate abstract_access array_member bools casts varargs_overload virtual_destructor) set ( LANGUAGES ) @@ -472,7 +472,7 @@ macro(add_tests language) set ( testfile ${CMAKE_CURRENT_SOURCE_DIR}/${testname}_runme${${language}_ext} ) if ( EXISTS ${testfile} ) - add_test(${name} "${${language}_interpreter}" ${${language}_args} ${testfile}) + add_test(${name} "${${language}_interpreter}" ${${language}_args} ${testfile} ) list (APPEND TEST_SRCS ${testfile} ) if ( DEFINED ${language}_test_environment ) set_tests_properties ( ${name} PROPERTIES ENVIRONMENT "${${language}_test_environment}" ) @@ -492,46 +492,51 @@ endmacro() -option ( USE_CSHARP "csharp" OFF ) +option ( USE_CSHARP "C#" OFF ) if ( USE_CSHARP ) add_subdirectory ( csharp ) endif () -option ( USE_D "d" OFF ) +option ( USE_D "D" OFF ) if ( USE_D ) add_subdirectory ( d ) endif () -option ( USE_GO "go" OFF ) +option ( USE_GO "Go" OFF ) if ( USE_GO ) add_subdirectory ( go ) endif () -option ( USE_GUILE "guile" ON ) +option ( USE_GUILE "Guile" ON ) if ( USE_GUILE ) add_subdirectory ( guile ) endif () -option ( USE_JAVA "java" OFF ) +option ( USE_JAVA "Java" OFF ) if ( USE_JAVA ) add_subdirectory ( java ) endif () -option ( USE_LUA "lua" ON ) +option ( USE_LUA "Lua" ON ) if ( USE_LUA ) add_subdirectory ( lua ) endif() -option ( USE_OCTAVE "octave" ON ) +option ( USE_OCTAVE "Octave" ON ) if ( USE_OCTAVE ) add_subdirectory ( octave ) endif() -option ( USE_PYTHON "python" ON ) +option ( USE_PYTHON "Python" ON ) if ( USE_PYTHON ) add_subdirectory ( python ) endif () +option ( USE_R "R" OFF ) +if ( USE_R ) + add_subdirectory ( r ) +endif () + option ( USE_RUBY "ruby" ON ) if ( USE_RUBY ) add_subdirectory ( ruby ) diff --git a/Examples/test-suite/r/CMakeLists.txt b/Examples/test-suite/r/CMakeLists.txt new file mode 100644 index 000000000..8a8287b43 --- /dev/null +++ b/Examples/test-suite/r/CMakeLists.txt @@ -0,0 +1,24 @@ + +find_library(R_LIBRARY NAMES R + PATH_SUFFIXES R/lib +) +find_path(R_INCLUDE_DIR NAMES R.h + PATH_SUFFIXES R + ) + +set (R_INCLUDE_DIRS ${R_INCLUDE_DIR}) + +find_program(R_EXECUTABLE NAMES R) + +if (R_EXECUTABLE AND R_INCLUDE_DIR AND R_LIBRARY) + set (R_FOUND TRUE) +endif () + +if ( R_FOUND ) + + set(r_args "--vanilla -f") + include_directories ( ${R_INCLUDE_DIRS} ) + + test_language ( r ".R" ${R_EXECUTABLE} ) +endif () + |