There are several examples how to setup GTest application on windows using mingw64. But they are all very simple - one source C file being tested by one C++ test file. Does anyone have an example setup with multiple C source files being test and then wrapped into a simple application? This is the directory structure:
./fancy_lib/
├── CMakeLists.txt
├── fancy_lib.h
├── src
│ ├── common.c
│ ├── common.h
│ ├── maths.c
│ ├── maths.h
│ ├── parameter.c
│ ├── parameter.h
│ ├── svpwm.c
│ └── svpwm.h
└── test
├── CMakeLists.txt
├── common_test.cpp
├── maths_test.cpp
├── parameter_test.cpp
└── svpwm_test.cpp
The reason I'm asking is that I'm running into the multiple definition of __debugbreak
and __fastfail
. Everything compiles if there is only one test file. But once more tests are added, the linking fails.