-
Notifications
You must be signed in to change notification settings - Fork 14
CMake integration for all 14 examples #245
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
Merged
Merged
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
4d1f0c6
First example success with cmake
aed2e76
Further CMake integration (all C++ examples up through example 8)
cade82f
All C++ examples now work with CMake (example 10 is broken for other …
c58f53f
Example 10 "fixed"
9686712
Python is pythoning with Cmake!
8a49d12
All examples done (up for review)
5408c0d
Initial comment fixes
f5bae66
Made all configure files with CMake cache variables
fb28eab
Further changes made for Pull Request.
98f2db8
Java examples with spdlog
ddde401
run.sh.in files pushed
c0dcbf0
example 4 run.sh updated
5d852b5
Better integration with external builds
6017012
Better integration with external builds
6a3bc9f
First five examples with bat files
19fd85d
Java bat files
c8856f7
Fixed Install Prefix for external build
cbba14f
Examples now work for both internal and external builds
7a1c15d
Removed absolute path from CMakeLists
771ebff
Java examples now compile in both Windows and Linux
cc6486d
Examples 2, 9 and 13 can now all be compiled together
9a1e372
2, 9 and 13 files cont.
2c240de
Python fixes
b57a2f9
Library path fixes
8f938ef
More python fixes for dependencies
0164812
ignores unnecessary files now
c084efd
Removed clutter from top level
5f6b3be
Java protobuf jar default path set
FlinkerBluid bccfb0b
Example 14 cmakelists modified
FlinkerBluid ba99c37
Alma build fix attempt 1
FlinkerBluid 14b257c
Attempt 2
FlinkerBluid a03eb9d
2AAA
FlinkerBluid 67453fc
attempt 3
FlinkerBluid 239b029
3A
FlinkerBluid 464de4e
3C
FlinkerBluid e24f5d7
4
FlinkerBluid 39bb30f
4B
FlinkerBluid 8edb453
4C
FlinkerBluid a0dc6f6
5
FlinkerBluid 4b6e99b
5B
FlinkerBluid 5ac9cee
6
FlinkerBluid ecbd4b7
5c
FlinkerBluid 51fb6c2
6
FlinkerBluid e1f31ac
7
FlinkerBluid a2ef678
6 restored
FlinkerBluid 81a05ab
6 again
FlinkerBluid 68c8d50
7
FlinkerBluid 9bc1cad
Merge remote-tracking branch 'kguilbert/private-spdlog'
FlinkerBluid a1d7072
CMakeLists changes in files not already changed in merge
FlinkerBluid 913260c
Merge remote-tracking branch 'gravity/master'
FlinkerBluid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| run.sh | ||
| cmake_build | ||
| bin | ||
| *Debug.bat | ||
| *Release.bat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # | ||
| # This section is common to all components | ||
| # | ||
| [general] | ||
| # Set the log level for logs written to the log file | ||
| GravityFileLogLevel=debug | ||
|
|
||
| # Set the log level for logs written to the console that started the component | ||
| #Can make output look funky, so uncomment at your own risk | ||
| #GravityConsoleLogLevel=debug | ||
|
|
||
| # Without this, Gravity will spend a few seconds trying to retrieve | ||
| # parameters from a remote ConfigServer. | ||
| NoConfigServer=true | ||
|
|
||
| # The URL where the ServiceDirectory will be found. This value is the same as the default. | ||
| ServiceDirectoryURL="tcp://localhost:5555" | ||
|
|
||
|
|
16 changes: 16 additions & 0 deletions
16
test/examples/1-BasicDataProduct/RunBasicDataProductDebug.bat.in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| setlocal | ||
|
|
||
| cd @CMAKE_INSTALL_PREFIX@/bin | ||
| set Path=%Path%;@ABS_GRAVITY_ROOT@/bin | ||
| set Path=%Path%;@ABS_GRAVITY_ROOT@/deps/libzmq/bin | ||
| set Path=%Path%;@ABS_GRAVITY_ROOT@/deps/protobuf/bin | ||
| set Path=%Path%;@ABS_GRAVITY_ROOT@/bin | ||
| set Path=%Path%;@LOCAL_ZEROMQ_RUNTIME_DIR@ | ||
| set path=%Path%;@LOCAL_PROTOBUF_RUNTIME_DIR@ | ||
| set path=%Path%;@BasicDataProduct_BINARY_DIR@/Debug | ||
|
|
||
| start ServiceDirectory@CMAKE_DEBUG_POSTFIX@.exe | ||
| sleep 3 | ||
| start BasicDataProductPublisher@CMAKE_DEBUG_POSTFIX@.exe | ||
| sleep 3 | ||
| start BasicDataProductSubscriber@CMAKE_DEBUG_POSTFIX@.exe |
16 changes: 16 additions & 0 deletions
16
test/examples/1-BasicDataProduct/RunBasicDataProductRelease.bat.in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| setlocal | ||
|
|
||
| cd @CMAKE_INSTALL_PREFIX@/bin | ||
| set Path=%Path%;@ABS_GRAVITY_ROOT@/bin | ||
| set Path=%Path%;@ABS_GRAVITY_ROOT@/deps/libzmq/bin | ||
| set Path=%Path%;@ABS_GRAVITY_ROOT@/deps/protobuf/bin | ||
| set Path=%Path%;@ABS_GRAVITY_ROOT@/bin | ||
| set Path=%Path%;@LOCAL_ZEROMQ_RUNTIME_DIR@ | ||
| set path=%Path%;@LOCAL_PROTOBUF_RUNTIME_DIR@ | ||
| set path=%Path%;@BasicDataProduct_BINARY_DIR@/Release | ||
|
|
||
| start ServiceDirectory.exe | ||
| sleep 3 | ||
| start BasicDataProductPublisher.exe | ||
| sleep 3 | ||
| start BasicDataProductSubscriber.exe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| cmake_minimum_required(VERSION 3.17) | ||
| project(Archiving) | ||
| # | ||
| # see CMakeLists.txt on how to set up CMAKE_PREFIX_PATH and CMAKE_MODULE_PATH | ||
| # | ||
|
|
||
| # for gravity_protobuf_generate | ||
| include(GravitySupport) | ||
|
|
||
|
|
||
| find_package(spdlog REQUIRED) | ||
| find_package(Gravity QUIET) | ||
|
|
||
| file(GLOB PROTO_FILES "${CMAKE_CURRENT_LIST_DIR}/../protobuf/*.proto") | ||
|
|
||
| gravity_protobuf_generate(APPEND_PATH PROTOC_OUT_DIR ${CMAKE_CURRENT_BINARY_DIR} OUT_VAR PROTO_SRCS | ||
| PROTOS ${PROTO_FILES}) | ||
|
|
||
| add_custom_target(${PROJECT_NAME}_protos ALL DEPENDS ${PROTO_SRCS}) | ||
|
|
||
| set(CMAKE_DEBUG_POSTFIX _d) | ||
| add_executable(ArchiveTest ArchiveTest.cpp ${PROTO_SRCS}) | ||
| set_target_properties(ArchiveTest PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}) | ||
| target_link_libraries(ArchiveTest PRIVATE gravity spdlog::spdlog_header_only) | ||
| target_include_directories(ArchiveTest PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) | ||
| add_dependencies(ArchiveTest ${PROJECT_NAME}_protos) | ||
|
|
||
| add_executable(ReplayTest ReplayTest.cpp ${PROTO_SRCS}) | ||
| set_target_properties(ReplayTest PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}) | ||
| target_link_libraries(ReplayTest PRIVATE gravity spdlog::spdlog_header_only) | ||
| target_include_directories(ReplayTest PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) | ||
| add_dependencies(ReplayTest ${PROJECT_NAME}_protos) | ||
|
|
||
| configure_file(run.sh.in ${Archiving_SOURCE_DIR}/run.sh) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| [general] | ||
| ServiceDirectoryURL="tcp://127.0.0.1:5555" | ||
| NoConfigServer=true | ||
| LocalLogLevel=DEBUG | ||
| ConsoleLogLevel=DEBUG | ||
| GravityFileLogLevel=DEBUG | ||
| #GravityConsoleLogLevel=DEBUG | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me - making it a cache variable with a default, you can over-ride from the command line if necessary