wreckman2314 / gamekit

Automatically exported from code.google.com/p/gamekit
0 stars 0 forks source link

gtest project was compiled with /MD #318

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I found that gtest project was compiled with /MD and /MDd when using msvc 2010. 
So I copy the follow scripts to UnitTests/gtest-1.6.0/CMakeLists.txt.

IF(MSVC)
    #We statically link to reduce dependancies
    FOREACH(flag_var    CMAKE_CXX_FLAGS 
                        CMAKE_CXX_FLAGS_DEBUG 
                        CMAKE_CXX_FLAGS_RELEASE 
                        CMAKE_CXX_FLAGS_MINSIZEREL 
                        CMAKE_CXX_FLAGS_RELWITHDEBINFO
                        CMAKE_C_FLAGS_DEBUG
                        CMAKE_C_FLAGS_RELEASE
                        CMAKE_C_FLAGS_MINSIZEREL 
                        CMAKE_C_FLAGS_RELWITHDEBINFO
                        )
        IF(${flag_var} MATCHES "/MD")
            STRING(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
        ENDIF(${flag_var} MATCHES "/MD")
        IF(${flag_var} MATCHES "/MDd")
            STRING(REGEX REPLACE "/MDd" "/MTd" ${flag_var} "${${flag_var}}")
        ENDIF(${flag_var} MATCHES "/MDd")
    ENDFOREACH(flag_var)

ENDIF(MSVC)

And then the project compiled with /MT and /MTd. I did that because I use gtest 
within gamekit to generate my own test project.

Original issue reported on code.google.com by oneminut...@gmail.com on 22 Sep 2013 at 9:28

GoogleCodeExporter commented 8 years ago
sorry. There was no errers in project gtest. I made some errors to use this 
project.

Original comment by oneminut...@gmail.com on 23 Sep 2013 at 8:40

GoogleCodeExporter commented 8 years ago

Original comment by harkon...@gmail.com on 22 Jun 2014 at 4:51