Commit accefc41 authored by fbarchard@google.com's avatar fbarchard@google.com

add gyp define to enable svn version check. defaults to off so tests built…

add gyp define to enable svn version check.  defaults to off so tests built outside of svn will build/run with a warning but not error.
BUG=356
TESTED=set GYP_DEFINES=target_arch=ia32 libyuv_disable_jpeg=1 libyuv_enable_svn=1
R=thorcarpenter@google.com

Review URL: https://webrtc-codereview.appspot.com/17329004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1075 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 3224e43e
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 1074
Version: 1075
License: BSD
License File: LICENSE
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 1074
#define LIBYUV_VERSION 1075
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
......@@ -9,6 +9,7 @@
{
'variables': {
'libyuv_disable_jpeg%': 0,
'libyuv_enable_svn%': 0,
},
'targets': [
{
......@@ -21,7 +22,6 @@
'testing/gtest.gyp:gtest_main',
],
'defines': [
'LIBYUV_SVNREVISION="<!(svnversion -n)"',
# Enable the following 3 macros to turn off assembly for specified CPU.
# 'LIBYUV_DISABLE_X86',
# 'LIBYUV_DISABLE_NEON',
......@@ -49,6 +49,11 @@
'unit_test/version_test.cc',
],
'conditions': [
[ 'libyuv_enable_svn == 1', {
'defines': [
'LIBYUV_SVNREVISION="<!(svnversion -n)"',
],
}],
['OS=="linux"', {
'cflags': [
'-fexceptions',
......
......@@ -36,6 +36,8 @@ TEST_F(libyuvTest, TestVersion) {
if (LIBYUV_VERSION != svn_revision) {
printf("WARNING - Versions do not match.\n");
}
#else
printf("WARNING - SVN Version unavailable. Test not run.\n");
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment