You can define gtest_force_shared_crt
to ON
before including gtest to achieve this. You can either do this via the command line:
cmake . -Dgtest_force_shared_crt=ON
or in your CMakeLists.txt
:
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…