Skip to content
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

CMake support #10

Merged
merged 1 commit into from
Oct 12, 2018
Merged

CMake support #10

merged 1 commit into from
Oct 12, 2018

Conversation

FlorianRhiem
Copy link
Contributor

This PR adds a CMakeLists.txt to the project:

  • The list file and possibly installed config files provide a library oatpp::oatpp.
  • If BUILD_SHARED_LIBS is set, a shared library will be built. Otherwise (the default) a static library will be built.
  • If OATPP_INSTALL is set (the default), an install target is generated that will install the library, its headers and cmake config files to the CMAKE_INSTALL_PREFIX.
  • If OATPP_BUILD_TESTS is set (the default), the tests are built into a single executable and a test target is generated that will run these tests using CTest. To allow this, test/AllTestsMain.cpp was added that will provide a main() for running all tests if the macro OATPP_ENABLE_ALL_TESTS_MAIN is defined during compilation.
  • To maintain CMakeLists.txt, new source and header files need to be added to the list of files for the oatpp library, or the oatppAllTests executable.

Fixes #7.

@lganzzzo
Copy link
Member

That is a great PR!
Thank you for your help and interest in the project!

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.

None yet

2 participants