-
Notifications
You must be signed in to change notification settings - Fork 4
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
GHI #18 Fix and polish CMake #19
Merged
Merged
Conversation
This file contains 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
- introduce `package_name` and `target_name` variables and use these where appropriate (i.e. without confusing reviewers about what values some variables hold) - replace `InstallConfig.cmake` with `in/patomic-config.cmake.in` - only include targets file in config file if target isn't already defined - add summary table in `OptionVariables.cmake` - change PATH cache variables to STRING so that there aren't issues if they're set on the command line - changed installed CMake names to kebab-case
- include `GNUInstallDirs` after setting `CMAKE_INSTALL_INCLUDEDIR` cache variable to avoid interfering with pre-existing one (previously changes didn't take effect) - add `/` at the end of the directory paths in `install(...)`, or CMake is unhappy
…esPath.cmake` - previously would do stuff if HOST was Windows even if TARGET wasn't windows - fixed by checking TARGET system
- expected by `patomic-test`, but always set by `patomic` if tests are enabled - if not set, UTs are disabled since we don't have access to required source files
- UT requires PATOMIC_{BINARY, SOURCE}_DIR variables are set (but these are private, so only works if patomic_test is a sub-project of patomic) - BT requires patomic::patomic target is available
- define PATOMIC_STATIC_DEFINE to disable visibility macros - otherwise will have issues of using the wrong import/export specification (because including a header file without telling CMake we're an importer so that it sets the correct defines) - not an issue since we don't link against any libraries in UTs Signed-off-by: doodspav <[email protected]>
- breaks test lookup on Windows - and not sure that it would work on older CMake versions anyway since there's no `GTest::GMock` target Signed-off-by: doodspav <[email protected]>
- start with a CML file in `/src` - unfortunately can't put one in `/include` because it would be available to users as well
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The few visible changes made:
create_test(...)
to_create_test(...)
create_bt(...)
andcreate_ut(...)
patomic::patomic
isn't available and can't be foundpatomic_test
isn't build as a sub-project ofpatomic
(becausepatomic
setsPATOMIC_{BINARY, SOURCE}_DIR
variables for the UTs to find the required files)gmock
currently not linked because it breaks automatic test lookup (might add later once there's a pipeline)