Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readme and examples #22 #26 #28

Merged
merged 6 commits into from
Apr 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .circleci/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,13 @@ FROM matthewjamesbriggs/mxci:v001
ENV BASEDIR="/mx"
WORKDIR $BASEDIR
COPY . .
CMD cmake -DMX_BUILD_TESTS=on -DMX_BUILD_CORE_TESTS=on . && make -j12 && ./MxTest
CMD cmake \
-DMX_BUILD_TESTS=on \
-DMX_BUILD_CORE_TESTS=on \
-DMX_BUILD_EXAMPLES=on \
. && \
make -j12 && \
./MxTest && \
./MxRead && \
./MxWrite
# CMD cmake --version
8 changes: 6 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,17 @@ jobs:
name: Cmake
command: |
[ "$(git rev-parse --abbrev-ref HEAD)" == "master" ] && \
cmake -DMX_BUILD_TESTS=on -DMX_BUILD_CORE_TESTS=on . || \
cmake -DMX_BUILD_TESTS=on -DMX_BUILD_CORE_TESTS=off .
cmake -DMX_BUILD_EXAMPLES=on -DMX_BUILD_TESTS=on -DMX_BUILD_CORE_TESTS=on . || \
cmake -DMX_BUILD_EXAMPLES=on -DMX_BUILD_TESTS=on -DMX_BUILD_CORE_TESTS=off .

- run:
name: Build
command: make

- run:
name: Run Examples
command: ./MxRead && ./MxWrite

- run:
name: Test
command: ./MxTest
Expand Down
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

87 changes: 87 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .idea/mx.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,22 @@ if(MX_BUILD_TESTS)
else()
message("tests will not be compiled")
endif()

# MxExamples
if(MX_BUILD_EXAMPLES)
message("examples will be compiled")
find_package( Threads )
add_executable(MxRead ${SOURCE}/mx/examples/Read.cpp)
add_executable(MxWrite ${SOURCE}/mx/examples/Write.cpp)
target_link_libraries(MxRead Mx ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(MxWrite Mx ${CMAKE_THREAD_LIBS_INIT})
set_property(TARGET MxRead PROPERTY CXX_STANDARD 14)
set_property(TARGET MxWrite PROPERTY CXX_STANDARD 14)

# TODO - create a proper 'include' directory
target_include_directories(MxRead PRIVATE ${SOURCE}/mx/api)
target_include_directories(MxWrite PRIVATE ${SOURCE}/mx/api)

else()
message("examples will not be compiled")
endif()
Loading