You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an issue for any project that wants to use SQLiteCpp, but also has to link to shared libraries (e.g., LGPL). Additional information in this SO answer: http://stackoverflow.com/a/4307551/2741329
I believe that a possible solution would be to adopt a CMake option similar to what gtest provides (i.e., gtest_force_shared_crt), so that user can decide the kind of runtime.
Incidentally, such an approach might also solve #53 without the need to add the export decorations as proposed in #57.
Hi @giumas, the fix I implemented is only the simplest option of all, that is, I know force the use of static runtime only when Unit Tests are enabled (which is OFF by default in the CMakeLists.txt).
If this does not suit your needs, please let me know.
Activity
SRombauts commentedon Jul 18, 2016
You are right, static runtime is only required/recommended by googletest, so I should force it only in coordination with unit tests.
Fix issue #92: force MSVC to use static runtime only if unit-tests ar…
SRombauts commentedon Jul 19, 2016
Hi @giumas, the fix I implemented is only the simplest option of all, that is, I know force the use of static runtime only when Unit Tests are enabled (which is OFF by default in the CMakeLists.txt).
If this does not suit your needs, please let me know.
Cheers!
giumas commentedon Jul 19, 2016
The changes solved my issue, so I don't need anymore to tweak the library's CMake.
Thank for having been so responsive!
SRombauts commentedon Jul 19, 2016
Nice!
Also, you can propose any other changes as Pull Requests if you wish.
Cheers
SRombauts commentedon Aug 18, 2023
CMakeFiles.txt updated to not force static runtime anymore #438