Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLion configuration and dependency tracking #2

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cmake_minimum_required(VERSION 3.6)
project(RSQLite)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")

include_directories(/home/muelleki/R/x86_64-pc-linux-gnu-library/current/BH/include)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little specific

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Substituted with a more generic configuration.

include_directories(/home/muelleki/R/x86_64-pc-linux-gnu-library/current/Rcpp/include)
include_directories(/home/muelleki/git/R/r-svn/R-3-3-1/include)
include_directories(inst/include)

file(GLOB SOURCE_FILES src/*.cpp src/*.c)
add_library(RSQLite ${SOURCE_FILES})
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}