Proper C++ version detection

This commit is contained in:
Pavel Kirienko
2014-03-17 20:38:02 +04:00
parent 06603ad237
commit 093328e386
4 changed files with 39 additions and 5 deletions
+11
View File
@@ -3,9 +3,20 @@
*/
#include <gtest/gtest.h>
#include <uavcan/impl_constants.hpp>
int main(int argc, char **argv)
{
#ifndef UAVCAN_CPP_VERSION
# error UAVCAN_CPP_VERSION
#endif
#if UAVCAN_CPP_VERSION == UAVCAN_CPP11
std::cout << "C++11" << std::endl;
#elif UAVCAN_CPP_VERSION == UAVCAN_CPP03
std::cout << "C++03" << std::endl;
#else
# error UAVCAN_CPP_VERSION
#endif
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}