How to set-up Visual Sutio Code to compile an executable from several .cpp files? I have following directory structure:
src
test
build
where in "src" I have some .cpp files with a program and in "test" I have a main.cpp file with
#include <gtest/gtest.h>
int main(int argc, char *argv[]) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
and several.cpp file with written tests.
How to compile it so that all .cpp will be included (linked?) and tests executed?
Right now I got stuck at compiling main.cpp and of course the result is
[==========] Running 0 tests from 0 test suites.
[==========] 0 tests from 0 test suites ran. (0 ms total)
[ PASSED ] 0 tests.
I need this to be simple and for training purposes of google tests, never been dealing with make makefiles, CMake etc.