Skip to content

Conversation

@tpetazzoni
Copy link
Contributor

…ilt-in flags

CMakeLists.txt and booster/CMakeLists.txt define some flags in CXX_FLAGS, and then set CMAKE_CXX_FLAGS in a way that causes the flags in CXX_FLAGS to override the ones passed (for example on the command line through CMAKE_CXX_FLAGS). This prevents the user from overriding those compiler flags in CXX_FLAGS.

A specific example is that CXX_FLAGS sets -std=c++11, but with recent version of ICU (such as >= 77-1), -std=c++11 is not enough, passing -std=c++17 is needed. Unfortunately, it cannot be passed through CMAKE_CXX_FLAGS due to the aforementioned problem.

This commit allows to resolve this by ensuring that CMAKE_CXX_FLAGS and CMAKE_C_FLAGS win over CXX_FLAGS/C_FLAGS.

…ilt-in flags

CMakeLists.txt and booster/CMakeLists.txt define some flags in
CXX_FLAGS, and then set CMAKE_CXX_FLAGS in a way that causes the flags
in CXX_FLAGS to override the ones passed (for example on the command
line through CMAKE_CXX_FLAGS). This prevents the user from overriding
those compiler flags in CXX_FLAGS.

A specific example is that CXX_FLAGS sets -std=c++11, but with recent
version of ICU (such as >= 77-1), -std=c++11 is not enough, passing
-std=c++17 is needed. Unfortunately, it cannot be passed through
CMAKE_CXX_FLAGS due to the aforementioned problem.

This commit allows to resolve this by ensuring that CMAKE_CXX_FLAGS
and CMAKE_C_FLAGS win over CXX_FLAGS/C_FLAGS.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
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.

1 participant