Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ADIOS2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Podhorszki, Norbert
ADIOS2
Commits
9f3556e6
Commit
9f3556e6
authored
7 years ago
by
Atkins, Charles Vernon
Browse files
Options
Downloads
Patches
Plain Diff
Use kwsys instead of posix for directory creation
parent
74af5c41
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
source/adios2/CMakeLists.txt
+1
-0
1 addition, 0 deletions
source/adios2/CMakeLists.txt
source/adios2/helper/adiosSystem.cpp
+4
-42
4 additions, 42 deletions
source/adios2/helper/adiosSystem.cpp
thirdparty/KWSys/CMakeLists.txt
+2
-0
2 additions, 0 deletions
thirdparty/KWSys/CMakeLists.txt
with
7 additions
and
42 deletions
source/adios2/CMakeLists.txt
+
1
−
0
View file @
9f3556e6
...
@@ -48,6 +48,7 @@ target_include_directories(adios2
...
@@ -48,6 +48,7 @@ target_include_directories(adios2
$<INSTALL_INTERFACE:include>
$<INSTALL_INTERFACE:include>
PRIVATE
${
ADIOS2_SOURCE_DIR
}
/source
PRIVATE
${
ADIOS2_SOURCE_DIR
}
/source
)
)
target_link_libraries
(
adios2 PRIVATE adios2sys
)
find_package
(
Threads REQUIRED
)
find_package
(
Threads REQUIRED
)
target_link_libraries
(
adios2 PUBLIC
${
CMAKE_THREAD_LIBS_INIT
}
)
target_link_libraries
(
adios2 PUBLIC
${
CMAKE_THREAD_LIBS_INIT
}
)
...
...
This diff is collapsed.
Click to expand it.
source/adios2/helper/adiosSystem.cpp
+
4
−
42
View file @
9f3556e6
...
@@ -9,12 +9,11 @@
...
@@ -9,12 +9,11 @@
*/
*/
#include
"adiosSystem.h"
#include
"adiosSystem.h"
#include
<sys/stat.h>
//stat, mkdir
#include
<ctime>
//std::ctime
#include
<sys/types.h>
//CreateDirectory
#include
<unistd.h>
//CreateDirectory
#include
<chrono>
//system_clock, now
#include
<chrono>
//system_clock, now
#include
<ctime>
//std::ctime
#include
<adios2sys/SystemTools.hxx>
#include
"adios2/ADIOSMPI.h"
#include
"adios2/ADIOSMPI.h"
#include
"adios2/ADIOSTypes.h"
#include
"adios2/ADIOSTypes.h"
...
@@ -25,44 +24,7 @@ namespace adios2
...
@@ -25,44 +24,7 @@ namespace adios2
bool
CreateDirectory
(
const
std
::
string
&
fullPath
)
noexcept
bool
CreateDirectory
(
const
std
::
string
&
fullPath
)
noexcept
{
{
auto
lf_Mkdir
=
[](
const
std
::
string
directory
,
struct
stat
&
st
)
->
bool
{
return
adios2sys
::
SystemTools
::
MakeDirectory
(
fullPath
);
if
(
stat
(
directory
.
c_str
(),
&
st
)
==
-
1
)
// doesn't exist
{
mkdir
(
directory
.
c_str
(),
0777
);
if
(
stat
(
directory
.
c_str
(),
&
st
)
==
-
1
)
// doesn't exist
{
return
false
;
}
}
return
true
;
};
bool
directoryExists
=
false
;
auto
directoryPosition
=
fullPath
.
find
(
"/"
);
if
(
fullPath
[
0
]
==
'/'
||
fullPath
[
0
]
==
'.'
)
{
// find the second '/'
directoryPosition
=
fullPath
.
find
(
"/"
,
directoryPosition
+
1
);
}
struct
stat
st
=
{
0
};
if
(
directoryPosition
==
fullPath
.
npos
)
// no subdirectories
{
directoryExists
=
lf_Mkdir
(
fullPath
.
c_str
(),
st
);
}
else
{
std
::
string
directory
(
fullPath
.
substr
(
0
,
directoryPosition
));
lf_Mkdir
(
directory
.
c_str
(),
st
);
while
(
directoryPosition
!=
fullPath
.
npos
)
{
directoryPosition
=
fullPath
.
find
(
"/"
,
directoryPosition
+
1
);
directory
=
fullPath
.
substr
(
0
,
directoryPosition
);
directoryExists
=
lf_Mkdir
(
directory
.
c_str
(),
st
);
}
}
return
directoryExists
;
}
}
bool
IsLittleEndian
()
noexcept
bool
IsLittleEndian
()
noexcept
...
...
This diff is collapsed.
Click to expand it.
thirdparty/KWSys/CMakeLists.txt
+
2
−
0
View file @
9f3556e6
set
(
KWSYS_NAMESPACE adios2sys
)
set
(
KWSYS_NAMESPACE adios2sys
)
set
(
KWSYS_USE_DynamicLoader ON
)
set
(
KWSYS_USE_DynamicLoader ON
)
set
(
KWSYS_USE_RegularExpression ON
)
set
(
KWSYS_USE_SystemTools ON
)
set
(
KWSYS_BUILD_SHARED OFF
)
set
(
KWSYS_BUILD_SHARED OFF
)
if
(
NOT ADIOS2_BUILD_SHARED_LIBS
)
if
(
NOT ADIOS2_BUILD_SHARED_LIBS
)
set
(
KWSYS_INSTALL_EXPORT_NAME adios2
)
set
(
KWSYS_INSTALL_EXPORT_NAME adios2
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment