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

Question: When added as subdirectory, CMake more often than not build Catch2. #2893

Closed
panwarab opened this issue Aug 3, 2024 · 2 comments
Closed

Comments

@panwarab
Copy link

panwarab commented Aug 3, 2024

Description
When added as a sub-directory, CMake more often than build Catch2 ( which takes some time ) since it's added as a static library. Is it possible to expose Catch2 via dll?

Additional context

[ 90%] Building CXX object libs/Catch2/src/CMakeFiles/Catch2.dir/catch2/matchers/catch_matchers_predicate.cpp.o
[ 91%] Building CXX object libs/Catch2/src/CMakeFiles/Catch2.dir/catch2/matchers/catch_matchers_quantifiers.cpp.o
[ 92%] Building CXX object libs/Catch2/src/CMakeFiles/Catch2.dir/catch2/matchers/catch_matchers_string.cpp.o
[ 92%] Building CXX object libs/Catch2/src/CMakeFiles/Catch2.dir/catch2/matchers/catch_matchers_templated.cpp.o
[ 93%] Building CXX object libs/Catch2/src/CMakeFiles/Catch2.dir/catch2/matchers/internal/catch_matchers_impl.cpp.o
[ 94%] Linking CXX static library libCatch2d.a
make[2]: Leaving directory '/home/lightning-mcqueen/repo/codespace/build'
[ 94%] Built target Catch2

Please let me know if you need more context.

@horenmar
Copy link
Member

If you are linking the library, it has to be built. If you want to use single build across multiple projects, install it globally and then link against that.

@ChrisThrasher
Copy link
Collaborator

Closing this issue as Catch2 already supports static or shared builds as desired by the user.

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

No branches or pull requests

3 participants