I have a project set to link with gtest like so:
FetchContent_Declare(googletest
GIT_REPOSITORY https://github.com/google/googletest
GIT_TAG master
)
FetchContent_MakeAvailable(googletest)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
target_link_libraries(testlib PRIVATE projlib gtest_main)
as you can see I link to gtest and also make sure to set:
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
yet when I build my projblib
with cmake I get that the run time library version still mismatch:
gtestd.lib(gtest-all.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't matc
h value 'MDd_DynamicDebug'
Not sure why this happens and how to fix this, suggestions?
Aucun commentaire:
Enregistrer un commentaire