Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dssp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
dssp
Commits
bd8e68d7
Commit
bd8e68d7
authored
Mar 09, 2024
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
this should work on windows as well
parent
3b92367b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
4 deletions
+18
-4
.github/workflows/cmake-multi-platform.yml
+0
-2
CMakeLists.txt
+8
-1
test/CMakeLists.txt
+3
-1
test/unit-test-dssp.cpp
+7
-0
No files found.
.github/workflows/cmake-multi-platform.yml
View file @
bd8e68d7
...
@@ -60,6 +60,4 @@ jobs:
...
@@ -60,6 +60,4 @@ jobs:
-
name
:
Test
-
name
:
Test
working-directory
:
${{ steps.strings.outputs.build-output-dir }}/test
working-directory
:
${{ steps.strings.outputs.build-output-dir }}/test
run
:
ctest --build-config Release --output-on-failure
run
:
ctest --build-config Release --output-on-failure
env
:
LIBCIFPP_DATA_DIR
:
${{ steps.strings.outputs.build-output-dir }}/_deps/cifpp-src/rsrc
CMakeLists.txt
View file @
bd8e68d7
...
@@ -85,6 +85,12 @@ if(MSVC)
...
@@ -85,6 +85,12 @@ if(MSVC)
get_WIN32_WINNT
(
ver
)
get_WIN32_WINNT
(
ver
)
add_definitions
(
-D_WIN32_WINNT=
${
ver
}
)
add_definitions
(
-D_WIN32_WINNT=
${
ver
}
)
if
(
BUILD_SHARED_LIBS
)
set
(
CMAKE_MSVC_RUNTIME_LIBRARY
"MultiThreaded$<$<CONFIG:Debug>:Debug>DLL"
)
else
()
set
(
CMAKE_MSVC_RUNTIME_LIBRARY
"MultiThreaded$<$<CONFIG:Debug>:Debug>"
)
endif
()
endif
()
endif
()
# Create a revision file, containing the current git version info
# Create a revision file, containing the current git version info
...
@@ -124,7 +130,8 @@ if(NOT PDB_REDO_META)
...
@@ -124,7 +130,8 @@ if(NOT PDB_REDO_META)
cifpp
cifpp
${
EXLC
}
${
EXLC
}
GIT_REPOSITORY https://github.com/pdb-redo/libcifpp.git
GIT_REPOSITORY https://github.com/pdb-redo/libcifpp.git
GIT_TAG v7.0.1
)
GIT_TAG 92bd52d
)
FetchContent_MakeAvailable
(
cifpp
)
FetchContent_MakeAvailable
(
cifpp
)
endif
()
endif
()
...
...
test/CMakeLists.txt
View file @
bd8e68d7
...
@@ -39,4 +39,6 @@ else()
...
@@ -39,4 +39,6 @@ else()
target_compile_definitions
(
unit-test-dssp PUBLIC CATCH22=1
)
target_compile_definitions
(
unit-test-dssp PUBLIC CATCH22=1
)
endif
()
endif
()
add_test
(
NAME unit-test-dssp COMMAND $<TARGET_FILE:unit-test-dssp> --data-dir
${
CMAKE_CURRENT_SOURCE_DIR
}
)
add_test
(
NAME unit-test-dssp COMMAND $<TARGET_FILE:unit-test-dssp>
--data-dir
${
CMAKE_CURRENT_SOURCE_DIR
}
/test
--rsrc-dir
${
CMAKE_CURRENT_BINARY_DIR
}
/_deps/cifpp-src/rsrc
)
test/unit-test-dssp.cpp
View file @
bd8e68d7
...
@@ -74,9 +74,13 @@ int main(int argc, char *argv[])
...
@@ -74,9 +74,13 @@ int main(int argc, char *argv[])
using
namespace
Catch
::
Clara
;
using
namespace
Catch
::
Clara
;
#endif
#endif
std
::
filesystem
::
path
rsrc_dir
;
auto
cli
=
session
.
cli
()
// Get Catch2's command line parser
auto
cli
=
session
.
cli
()
// Get Catch2's command line parser
|
Opt
(
gTestDir
,
"data-dir"
)
// bind variable to a new option, with a hint string
|
Opt
(
gTestDir
,
"data-dir"
)
// bind variable to a new option, with a hint string
[
"-D"
][
"--data-dir"
]
// the option names it will respond to
[
"-D"
][
"--data-dir"
]
// the option names it will respond to
|
Opt
(
rsrc_dir
,
"rsrc-dir"
)
// bind variable to a new option, with a hint string
[
"-D"
][
"--rsrc-dir"
]
// the option names it will respond to
(
"The directory containing the data files"
);
// description string for the help output
(
"The directory containing the data files"
);
// description string for the help output
// Now pass the new composite back to Catch2 so it uses that
// Now pass the new composite back to Catch2 so it uses that
...
@@ -87,6 +91,9 @@ int main(int argc, char *argv[])
...
@@ -87,6 +91,9 @@ int main(int argc, char *argv[])
if
(
returnCode
!=
0
)
// Indicates a command line error
if
(
returnCode
!=
0
)
// Indicates a command line error
return
returnCode
;
return
returnCode
;
if
(
not
rsrc_dir
.
empty
()
and
std
::
filesystem
::
exists
(
rsrc_dir
))
cif
::
add_data_directory
(
rsrc_dir
);
return
session
.
run
();
return
session
.
run
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment