Compile Google Test for VxWorks
On the time I wrote this article, VxWorks was not yet supported by Google test (Gtest). This article describe the procedure to port the Google test to be used on VxWorks RTP Projects.
Create a RTP project on VxWorks
Set the Project to be a library (Build Properties » Target » Build tool = Librarian)
- Define the variable GTEST_ROOT variable to be the path where the Google test folder is (Build Properties » Target » Variable » New):
Note: The Google Test folder is the folder where is located the scr, include, script folders.
- Define the entries GTEST_HAS_POSIX_RE, GTEST_HAS_TR1_TUPLE and GTEST_HAS_STREAM_REDIRECTION to be 0 (Build Properties » Defines » Add):
- Add the GTEST_ROOT folder and GTEST_ROOT/Include folders as Include directories (Build Properties » Paths » Add):
Add the following source files into your project:
- That is all. Now you can compile your project: