Skip to content

Commit

Permalink
namespace filesystem.
Browse files Browse the repository at this point in the history
  • Loading branch information
ksherlock committed Aug 28, 2016
1 parent 8259f02 commit a4844c1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,13 @@ endif()

if(CXX_STD_FILESYSTEM_NAMESPACE)
set(FS_NAMESPACE "std::filesystem")
set(IMPORT_FS_NAMESPACE "namespace filesystem = std::filesystem;")
elseif(CXX_HAVE_EXPERIMENTAL_FILESYSTEM)
set(FS_NAMESPACE "std::experimental::filesystem")
set(IMPORT_FS_NAMESPACE "namespace filesystem = std::experimental::filesystem;")
else()
set(FS_NAMESPACE "filesystem")
set(IMPORT_FS_NAMESPACE " ")
endif()

configure_file(filesystem.h.in ${CMAKE_CURRENT_SOURCE_DIR}/filesystem.h)
Expand Down
4 changes: 4 additions & 0 deletions filesystem.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/* default header. will be replaced if CMake is used. */
/* use git update-index --assume-unchanged filesystem.h to ignore changes */

#define FS_HEADER "cxx_filesystem.h"
#define FS_NAMESPACE filesystem
#define IMPORT_FS_NAMESPACE

#include FS_HEADER

IMPORT_FS_NAMESPACE
4 changes: 4 additions & 0 deletions filesystem.h.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/* auto-generated by CMake from filesystem.h.in */
/* use git update-index --assume-unchanged filesystem.h to ignore changes */

#cmakedefine FS_HEADER @FS_HEADER@
#cmakedefine FS_NAMESPACE @FS_NAMESPACE@
#cmakedefine IMPORT_FS_NAMESPACE @IMPORT_FS_NAMESPACE@

#include FS_HEADER

IMPORT_FS_NAMESPACE
1 change: 1 addition & 0 deletions mapped_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class mapped_file_base {
typedef FS_NAMESPACE::path path_type;

enum mapmode { readonly, readwrite, priv };
enum createmode { truncate, exclusive };

void close();

Expand Down

0 comments on commit a4844c1

Please sign in to comment.