I'm using rapidjson and I want to use std::string's with it. Then I have to define this -DRAPIDJSON_HAS_STDSTRING.
My CMakeLists.txt have now:
add_definitions(-DRAPIDJSON_HAS_STDSTRING)
And it builds ok.
The problem is that in Eclipse CDT I want the indexer to recognize that define. Then it will not mark some functions as errors.
How can I do it with CMakeLists.txt ? I tried this without luck:
set(CMAKE_CXX_COMPILER_ARG1 "-std=c++11 -DRAPIDJSON_HAS_STDSTRING=1" CACHE STRING "Compiler Args" FORCE)