Skip to content

Conversation

@MartinStej
Copy link

This should fix problem with file location when building in customdirectory.
Add frequency speed into compiler flags.
Unless variable is cache, they should be lower_case. But if required, I can change it to UPPER_CASE.

This should fix problem with file location when building in custom
directory.
Add frequency speed into compiler flags.
endif(NOT ARGN)

set(target_name ${EXECUTABLE_NAME}${MCU_TYPE_FOR_FILENAME})
set(bin_dir "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is changing the output directory, i.e. it changes behaviour, doesn't it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it changes build directory, respectively define relation between build directory and output file. In previous case it as relative to executed cmake command.

Not saying you have to accept it, but in general, output files shall be defined as inside "build" directory.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally the user chooses the build directory depending on the needs, like

cmake . -Bbuild-firmware

where the build is done in build-firmware. IMHO the CMake code should respect the choice of the user and not change it in an arbitrary way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants