Skip to content

Conversation

@mikefero
Copy link

@mikefero mikefero commented Apr 24, 2020

  • 1:1 recreation of standard Makefile build process
  • Added checks for library dependencies
  • Added source and folder grouping for IDE development
  • Moved test framework tpunit into a static library
  • Added error for Windows and warning for WSL

This CMake build process will allow for different release, debug, and relwithdebug builds by adding the CMake build flag -DCMAKE_BUILD_TYPE=<Debug|Release|RelWithDebug>. This also increases the speed of build process by approximately 30-40% when compared against the TravisCI build matrix (part of this is due to the libmbedtls programs not being built by default and moving tpunit into a static library). "Out-of-tree" builds are also possible when using CMake to configure and manage the build process.

Makefile CMake Difference Build Speed Increase
332.79s 220.14s 112.65 33.9%

IDE source_group and FOLDER usage can be seen here:

cmake-bedrockdb-ide-source-grouping

Note:

  • Use -DENABLE_MBEDTLS_PROGRAMS=On to build libmedtls programs
  • Use -DENABLE_PRODUCTION=On for testplugin library
  • Use -DENABLE_TESTING=On to build tests and test dependencies
  • Use -DCMAKE_VERBOSE_MAKEFILE=On to see full build process

Standard make build process is still available with this addition.

@dinedal
Copy link

dinedal commented May 14, 2020

This looks amazing, thank you!

mikefero added 2 commits June 18, 2020 06:37
- 1:1 recreation of standard Makefile process
- Added checks for library dependencies
- Added source and folder grouping for IDE development
- Moved test framework (tpunit) into a static library
- Added error for Windows and warning for WSL

Note:
 - Use '-DENABLE_MBEDTLS_PROGRAMS=On' to build libmedtls programs
 - Use '-DENABLE_PRODUCTION=On' for testplugin library
 - Use '-DENABLE_TESTING=On' to build tests and test dependencies
 - Use '-DCMAKE_VERBOSE_MAKEFILE=On' to see full build process
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants