Commit ec75f86
committed
don't emit -ltbb when no tbb was installed
The Windows branch of tbbLdFlags() named the TBB libraries
unconditionally, dropping the file.exists() guard the previous stub-based
code had. On a build that fell back to tinythread -- configure.R sets
TBB_ENABLED = FALSE only there, when cmake is missing and TBB_LIB is
unset -- RcppParallelLibs() then emitted
-L<libs> -lRcppParallel -L<lib> -ltbb -ltbbmalloc
for libraries that were never built or shipped, so a downstream package
would fail to link with "cannot find -ltbb". CxxFlags() correctly reports
-DRCPP_PARALLEL_USE_TBB=0 in that configuration, so the package is not
even using TBB.
Name them only when TBB is enabled and the library actually resolves.
Also drop an unverified aside from NEWS: Rtools42 and Rtools45 are
confirmed to ship cmake, Rtools40 was not checked.1 parent a54538d commit ec75f86
2 files changed
Lines changed: 19 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
107 | 114 | | |
108 | 115 | | |
109 | 116 | | |
| |||
0 commit comments