Skip to content

Commit

Permalink
Merge branch 'f-clion'. Closes krlmlr#2
Browse files Browse the repository at this point in the history
- Add/ignore CLion configuration files
- Enable tracking of header dependencies
  • Loading branch information
krlmlr committed Sep 29, 2016
2 parents 6153e13 + 12e71f9 commit 9deb7a3
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ demo/pandas
^README-.*\.png$
^codecov\.yml$
^appveyor\.yml$
^\.idea$
^CMakeLists\.txt$
^src/.*\.d$
^src/Makevars\.local$
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.o
src/*.o-*
*.so
/src/*.o
/src/*.o-*
/src/*.d
/src/*.so
*.dll
.RData
.Rproj.user
Expand All @@ -9,3 +10,4 @@ inst/doc
.httr-oauth
vignettes/*.R
.DS_Store
/.idea
22 changes: 22 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
cmake_minimum_required(VERSION 3.6)
project(dplyr)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")

set(R_LIBRARY "~/R-library")
set(R_INCLUDE "/usr/share/R/include")

include_directories(${R_LIBRARY}/BH/include)
include_directories(${R_LIBRARY}/Rcpp/include)
include_directories(${R_LIBRARY}/plogr/include)
include_directories(${R_INCLUDE})
include_directories(inst/include)

file(GLOB SOURCE_FILES src/*.cpp src/*.c)
add_library(dplyr ${SOURCE_FILES})

add_custom_target(
Rinstall
# Using MAKEFLAGS=-j$(nproc) didn't work
COMMAND MAKEFLAGS=-j4 nice R CMD INSTALL --libs-only --no-test-load ${dplyr_SOURCE_DIR}
)
8 changes: 8 additions & 0 deletions src/Makevars
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,11 @@ PKG_CPPFLAGS = -I../inst/include -DCOMPILING_DPLYR

# Disable long types from C99 or CPP11 extensions
PKG_CXXFLAGS = -DBOOST_NO_INT64_T -DBOOST_NO_INTEGRAL_INT64_T -DBOOST_NO_LONG_LONG

all: $(SHLIB)

# This file exists only for R CMD INSTALL, is created as empty file
# for building from source archive
Makevars.local:
touch "$@"
include Makevars.local
3 changes: 3 additions & 0 deletions src/Makevars.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CXX_SOURCES = $(wildcard *.cpp)
DEPFILES = ${CXX_SOURCES:.cpp=.d}
include ${DEPFILES}

0 comments on commit 9deb7a3

Please sign in to comment.