File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ BUILD_ENV = AUTO
1111# CXXFLAGS += -O2 -DNDEBUG
1212# CXXFLAGS += -O0 -g
1313
14+ LIBS = -lboost_filesystem -lboost_system
15+
1416# If GLPK is available; this is used by goto-instrument and musketeer.
1517# LIB_GLPK = -lglpk
1618
Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ Date: January 2012
3232#define pclose _pclose
3333#endif
3434
35+ #ifdef USE_BOOST
36+ #include < boost/filesystem.hpp>
37+ #endif
38+
3539#include " file_util.h"
3640
3741
@@ -238,10 +242,14 @@ void fileutl_create_directory(std::string const& pathname)
238242# if defined(WIN32)
239243 std::system ((std::string (" mkdir \" " ) + pathname + " \" " ).c_str ());
240244# elif defined(__linux__) || defined(__APPLE__)
245+ #ifdef USE_BOOST
246+ boost::filesystem::create_directories (pathname);
247+ #else
241248 auto ignore = std::system (
242249 (std::string (" mkdir -p \" " ) + pathname + " \" " ).c_str ()
243250 );
244251 (void )ignore;
252+ #endif
245253# else
246254# error "Unsuported platform."
247255# endif
You can’t perform that action at this time.
0 commit comments