-
Notifications
You must be signed in to change notification settings - Fork 7
--at-once odb feature and windows support #1
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
Open
a-pavlov
wants to merge
9
commits into
BtbN:master
Choose a base branch
from
a-pavlov:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
710f5e8
Prepare variable for find module on windows
b9a2164
Add ability to compile all sources into one file
98ed46a
Prepare AT_ONCE property for cmake build
847c5ee
Update README
a-pavlov c4805f3
Minor fix
a-pavlov 903f59b
Update README
a-pavlov b13c2e0
Use target_compile_definitions
a-pavlov 34b5724
Merge branch 'master' of https://github.com/a-pavlov/OdbCmake
a-pavlov 450e26a
Use tabs, remove odb_root, uncomment lib cache
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,12 @@ | ||
| CMake Find Module and UseFile for ODB. | ||
|
|
||
| See example for information on useage, i'm too lazy to write documentation right now. | ||
| ### Windows ODB installation notes: | ||
| Install all odb components into some directory and setup environment variable CMAKE_PREFIX_PATH=your_odb_installation_directory. | ||
| Directory must contain sub-directories bin for executables(especially odb.exe) and dlls, | ||
| include/odb for odb headers and lib for lib files. | ||
| For example c:\odb\bin, c\odb\include and c:\odb\lib. Note: when you copy odb.exe - do not copy only exe file - you need all directories from archive. | ||
|
|
||
| ### Generate project Windows/Linux | ||
| * One structure per file. Simply run cmake without options. | ||
| * All persistent structures in one file - set option AT_ONCE=ON. For example cmake . -DAT_ONCE=ON | ||
|
|
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,32 @@ | ||
| // file : hello/employee.hxx | ||
| // copyright : not copyrighted - public domain | ||
|
|
||
| #ifndef EMPLOYEE_HXX | ||
| #define EMPLOYEE_HXX | ||
|
|
||
|
|
||
| #include <string> | ||
| #include <cstddef> // std::size_t | ||
|
|
||
| #include <odb/core.hxx> | ||
|
|
||
| #pragma db object | ||
| class employee | ||
| { | ||
| public: | ||
| std::string position() const { return position_; } | ||
| unsigned short experience() const { return experience_; } | ||
|
|
||
| private: | ||
| friend class odb::access; | ||
|
|
||
| employee () {} | ||
|
|
||
| #pragma db id auto | ||
| unsigned long id_; | ||
|
|
||
| std::string position_; | ||
| unsigned short experience_; | ||
| }; | ||
|
|
||
| #endif // EMPLOYEE_HXX |
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.
The intendation of this file was messed up, making it nearly impossible to compare.
Please use tabs for intendation.