-
Notifications
You must be signed in to change notification settings - Fork 13
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
build: introduce CMake based build #6
Conversation
project(LMDB | ||
LANGUAGES C) | ||
|
||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) |
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.
Why not use GNUInstallDirs
?
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.
Mostly laziness, but that's easy to adopt.
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.
Wait, why would we use GNUInstallDirs
here? This is the build tree, not the install tree.
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.
oh yeah, fair enough. Do these need to go in special directories then? The build directory locations should all be set in the LMDB config file.
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.
No, there is no need to go into special directories. We don't really have any install rules for this module (I can add them if you feel like they are important).
The build directory locations should be handled by CMake - we don't define the imported locations, that is generated by CMake.
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.
I still feel a tad weird about projects poking directly into another project's build directory (unless they're using the *Config.cmake
file to get the appropriate locations and layouts), but I'll accept it for now since the rest of the Swift ecosystem does this.
This adds a CMake based build for LMDB to support DocC. By using CMake for the build, we are able to reduce the overall toolchain build time by ~7% on Windows.
project(LMDB | ||
LANGUAGES C) | ||
|
||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) |
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.
I still feel a tad weird about projects poking directly into another project's build directory (unless they're using the *Config.cmake
file to get the appropriate locations and layouts), but I'll accept it for now since the rest of the Swift ecosystem does this.
This adds a CMake based build for LMDB to support DocC. By using CMake for the build, we are able to reduce the overall toolchain build time by ~7% on Windows.