rcsoccersim / rcssmonitor

The RoboCup Soccer Simulator Monitor
GNU General Public License v3.0
47 stars 25 forks source link

CMake build system ignores user supplied CMAKE_CXX_FLAGS #37

Closed hedayat closed 2 years ago

hedayat commented 2 years ago

This line in CMakeLists.txt overwrites any user supplied values which is not desirable. A minimum change would be to append values to this variable; more suitable approach is probably to change default values and let the user decide if he wants to use the default ones or not. An example of the latter approach is available here.

Same problem exists in rcssserver project.

hidehisaakiyama commented 2 years ago

Thanks for the comment. I'm still unfamiliar with CMake.

Do users need to change the compiler flags for warning messages? If not, target_compile_options(rcssmonitor -W -Wall) is enough?

hedayat commented 2 years ago

To be honest, I don't know the answer to your first question! There might be someone who prefers to not see the warnings; but it might not be a priority.

But yeah, that'd work in that case but it seems that the scope argument is mandatory: target_compile_options(rcssmonitor PRIVATE -W -Wall)

hidehisaakiyama commented 2 years ago

OK. Thanks. Will be fixed soon.