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
I am attempting to build googletest and googlemock from its source directly using Premake5.
Background on builder choice: My project is using Premake5 because it seemed easier to setup compared to CMAKE, and I feel this is true so far, since, CMAKE guides are relatively confusing to follow and Premake5 is just Lua.
Issue
I am currently running into an error where my generated makefile script is finding the following error:
extern/__include__/GoogleTest/googlemock/src/gmock-all.cc:42:10: fatal error: src/gmock-cardinalities.cc: No such file or directory
42 | #include "src/gmock-cardinalities.cc"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
This error feels weird because it makes it seem like I should add -Igooglemock/src which is not really a standard practice for C++ where you typically want to Include Header files and not Source files.
I have GoogleTest project forked and linked as a submodule to my project, so I have everything that is on the master branch. Is this a mistake in the source code to include source code rather than the headers?
Hello everyone,
I am attempting to build
googletest
andgooglemock
from its source directly using Premake5.Background on builder choice:
My project is using Premake5 because it seemed easier to setup compared to CMAKE, and I feel this is true so far, since, CMAKE guides are relatively confusing to follow and Premake5 is just Lua.
Issue
I am currently running into an error where my generated makefile script is finding the following error:
This error feels weird because it makes it seem like I should add
-Igooglemock/src
which is not really a standard practice for C++ where you typically want to Include Header files and not Source files.I have GoogleTest project forked and linked as a submodule to my project, so I have everything that is on the master branch. Is this a mistake in the source code to include source code rather than the headers?
Additional Information
I am using VSCode with GCC 14 (C++23).
Edit 1 (From my own comment below)
https://cplusplus.com/forum/general/39618/
Generally, it seems to be looked down upon to include source files due to compilation and linking ending up including the file twice...
Edit 2 (From my second comment)
Looking at your CMakeLists.txt file, it does appear that you are including source files as if they were header files...
Originally posted by @AeroSW in #4580
The text was updated successfully, but these errors were encountered: