Skip to content

Making a premake5.lua project for googletest. #3776

Discussion options

You must be logged in to vote

I actually managed to solve it! I had to set the runtime to MT for both googletest, googlemock as well in the App project!

project "googlemock"
+    staticruntime "on" --This will set the /MT in Visual Studio and not the default /MD (which stands for DLL)

You must also use the same runtime on your console app (executable) project where you link googletest. You must also make
sure that the runtime is the same as well:

	filter{}
	filter "configurations:Debug"
		defines "DEBUG"
+		runtime "Debug"
		symbols "on"

	filter{}
	filter "configurations:PreRelease"
		defines "NDEBUG"
+		runtime "Release"
		optimize "on"

	filter{}
	filter "configurations:Release"
		defines "NDEBUG"
+		runtime "Release"

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by babaliaris
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant