Closed nbars closed 9 years ago
Thanks for finding the issue.
I'll go for the first proposal for now. I'll think about introducing also the second one as a possibility, but need a little more time to check if this is going to work in all environments.
See commit [https://github.com/mkleemann/cmake-avr/commit/08de87004a38170e4b71d4e2c2bc592cd27a8895].
Added notes about the avoidances. All possible solutions are now shown in the examples provided.
Hey,
first of all I want to thank you for the grate project.
But i think there is a bug: The variables (e.g. AVR_MCU) defined at the top of the CmakeLists file inside the root directory are never used.
I think this is because the tool chain file, which is passed with "-DCMAKE_TOOLCHAIN_FILE=../../generic-gcc-avr.cmake is parsed right after the project() call, but at this moment there are´t any variables set. Because of this the generic-gcc-avr.cmake script uses always the default values.
Steps to reproduce
Possible solution 1 Move the project() call to a position downwards. (Don´t know which variables will be used by the generic-gcc file... so it could be that we need to move the project() call anywhere else ?!) e.g.
2 Introduce a new parameter and manually include the generic-gcc-cmake file.