cppcoro icon indicating copy to clipboard operation
cppcoro copied to clipboard

Properly configure Coroutines cmake module

Open karzhenkov opened this issue 4 years ago • 2 comments

There are some problems when using cppcoro from an external project:

  • the installed library cannot be used if the final version of C++20 coroutines is not supported by toolset;
  • the library cannot be used directly from its build tree, which would sometimes be convenient.

The first commit adds tests that attempt to build an executable using cppcoro:

  • app_build_with_cppcoro_install_dir
  • app_build_with_cppcoro_build_tree
  • helper tests to install cppcoro and configure the application build tree.

Following commits make the tests successful.

This PR should probably go to add_cmake_support, but that branch looks somewhat outdated.

karzhenkov avatar Jan 23 '21 11:01 karzhenkov

Hi @karzhenkov , thanks a lot for your feedback, I'll have a look tomorrow. I do not maintain the add_cmake_support branch any more, see my latest comment in https://github.com/lewissbaker/cppcoro/pull/174 .

andreasbuhr avatar Jan 23 '21 17:01 andreasbuhr

Any update of integrating this into the main branch? I stumbled upon the same problem and it would be nice to be able to just clone the main branch from my build system. Thank you guys for your efforts!

bhundt avatar Aug 13 '22 15:08 bhundt