-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathconfigure.win
More file actions
37 lines (28 loc) · 962 Bytes
/
configure.win
File metadata and controls
37 lines (28 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Script used to generate `Makevars.win` from `Makevars.win.in` on Windows
# Adapted from LightGBM https://github.com/microsoft/LightGBM/blob/master/R-package/configure.win
###########################
# find compiler and flags #
###########################
R_EXE="${R_HOME}/bin${R_ARCH_BIN}/R"
CXX17=`"${R_EXE}" CMD config CXX17`
CXX17STD=`"${R_EXE}" CMD config CXX17STD`
CXX="${CXX17} ${CXX17STD}"
CXXFLAGS=`"${R_EXE}" CMD config CXX17FLAGS`
CXX_STD="CXX17"
CPPFLAGS=`"${R_EXE}" CMD config CPPFLAGS`
# Stochtree-specific flags
STOCHTREE_CPPFLAGS=""
#########
# Eigen #
#########
STOCHTREE_CPPFLAGS="${STOCHTREE_CPPFLAGS} -DEIGEN_MPL2_ONLY -DEIGEN_DONT_PARALLELIZE"
##########
# OpenMP #
##########
STOCHTREE_CPPFLAGS="${STOCHTREE_CPPFLAGS}"
#########################
# Generate Makevars.win #
#########################
sed -e "s/@CXX_STD@/$CXX_STD/" \
-e "s/@STOCHTREE_CPPFLAGS@/$STOCHTREE_CPPFLAGS/" \
< src/Makevars.win.in > src/Makevars.win