File tree 2 files changed +10
-0
lines changed 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ BUILD_ENV = AUTO
11
11
# CXXFLAGS += -O2 -DNDEBUG
12
12
# CXXFLAGS += -O0 -g
13
13
14
+ LIBS = -lboost_filesystem -lboost_system
15
+
14
16
# If GLPK is available; this is used by goto-instrument and musketeer.
15
17
# LIB_GLPK = -lglpk
16
18
Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ Date: January 2012
32
32
#define pclose _pclose
33
33
#endif
34
34
35
+ #ifdef USE_BOOST
36
+ #include < boost/filesystem.hpp>
37
+ #endif
38
+
35
39
#include " file_util.h"
36
40
37
41
@@ -238,10 +242,14 @@ void fileutl_create_directory(std::string const& pathname)
238
242
# if defined(WIN32)
239
243
std::system ((std::string (" mkdir \" " ) + pathname + " \" " ).c_str ());
240
244
# elif defined(__linux__) || defined(__APPLE__)
245
+ #ifdef USE_BOOST
246
+ boost::filesystem::create_directories (pathname);
247
+ #else
241
248
auto ignore = std::system (
242
249
(std::string (" mkdir -p \" " ) + pathname + " \" " ).c_str ()
243
250
);
244
251
(void )ignore;
252
+ #endif
245
253
# else
246
254
# error "Unsuported platform."
247
255
# endif
You can’t perform that action at this time.
0 commit comments