kartikkumar/cppbase

Replace "add_definitions" by "add_compile_definitions"

kartikkumar opened this issue · 3 comments

Currently, the version of CMake built from source for the Travis CI build doesn't support add_compile_definitions. This means that for PR #3, the deprecated add_definitions has to be used instead.

To switch to add_compile_definitions, the CMake version has to be bumped up, but initial testing shows that this causes issues for the custom Doxygen scripts for the Travis CI build, because of updates in FindDoxygen.cmake.

So this issue requires both the CMake and Doxygen scripts for Travis to be updated.

Disregard my last comment. What about using target_compile_definitions?

So I didn't realize that Travis ships with a newer version of CMake now. Used to be 2.8 I think, which is why I set up a custom script to build from source.

I'll try to investigate use of add_compile_definitions or target_compile_definitions, using the version of CMake that's native to Travis VMs now. Just have to make sure it doesn't break the Doxygen setup.

Thanks for the suggestion!

Obsolete with the migration to the new, modern CMake setup, as of 2d941d3