I need to compile different versions of a certain project by adding compiler switches. Usually I would do this by using add_definitions or something like
To pass a C++ or C pre-processor define without modifying any CMake source files, use the environment variables CFLAGS for C or CXXFLAGS for C++ respectively, e.g.: