Hi all~

I would like to add gtest to my project with ExternalProject_Add(), and I'm 
using the vs2012 RC compiler to compile everything.  I'm getting compile errors 
related to gtest using tuples:

4>H:\perforce\bin\vs11x64.SuperBuild\external\gtest\src\gTest\include\gtest/gtest-printers.h(550):
 error C2977: 'std::tuple' : too many template arguments
4>
4>  2>          C:\Program Files (x86)\Microsoft Visual Studio 
11.0\VC\include\utility(73) : see declaration of 'std::tuple'
4>
4>H:\perforce\bin\vs11x64.SuperBuild\external\gtest\src\gTest\include\gtest/gtest-printers.h(558):
 error C2977: 'std::tuple' : too many template arguments
4>
4>  2>          C:\Program Files (x86)\Microsoft Visual Studio 
11.0\VC\include\utility(73) : see declaration of 'std::tuple'

This is a known problem with gtest and visual studio 2012, as noted here:
http://stackoverflow.com/questions/8274588/c2977-stdtuple-too-many-template-arguments-msvc11
http://code.google.com/p/googletest/issues/detail?id=412

I would like to define the _VARIADIC_MAX=10 preprocessor definition for the 
gtest cmake project, such that when my ExternalProject_Add() compiles gtest, 
this preprocessor symbol is defined and gtest compiles correctly.  I manually 
tested that the preprocessor definition works.  So how to pass the preprocessor 
definition though ExternalProject_Add()?  Any ideas?

I would like to avoid having to use the PATCH_COMMAND to patch the gtest cmake 
files.

Thanks for your ideas,
Kent
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to