Mentions légales du service

Skip to content
Snippets Groups Projects
Commit dc10020a authored by David Parsons's avatar David Parsons
Browse files

Fix issue#43 aevol_propagate: create parent dirs

aevol_propagate: create parent directories of outdir as needed
details: https://aevol.myjetbrains.com/youtrack/issue/aevol-43
parent a950a9f1
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,9 @@ LDADD = $(top_srcdir)/src/libaevol/libaevol.a $(top_srcdir)/src/libaevol/SFMT-sr
bin_PROGRAMS = aevol_run aevol_create aevol_modify aevol_propagate
CLEANFILES = aevol_run aevol_create aevol_modify aevol_propagate
aevol_propagate_CPPFLAGS = $(AM_CPPFLAGS) $(BOOST_CPPFLAGS)
aevol_propagate_LDFLAGS = $(AM_LDFLAGS) $(BOOST_LDFLAGS)
aevol_propagate_LDADD = $(LDADD) $(BOOST_SYSTEM_LIB) $(BOOST_FILESYSTEM_LIB)
aevol_run_SOURCES = aevol_run.cpp
aevol_create_SOURCES = aevol_create.cpp
......
......@@ -39,6 +39,9 @@ const char* DEFAULT_PARAM_FILE_NAME = "param.in";
#include <limits>
// TODO(dpa) will be merged into C++17, remove dependency when possible
#include <boost/filesystem.hpp>
#if __cplusplus == 201103L
#include "make_unique.h"
#endif
......@@ -71,7 +74,7 @@ int main(int argc, char* argv[]) {
// If output directory doesn't exist, create it
struct stat stat_buf;
if ((stat(output_dir, &stat_buf) == -1) && (errno == ENOENT)) {
if (mkdir(output_dir, 0755)) {
if (not boost::filesystem::create_directories(output_dir)) {
err(EXIT_FAILURE, output_dir, errno);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment