Lorenzo Pistone
Lorenzo Pistone

Reputation: 5188

cmake: compiler flag for all build types

is there a way to add a compiler flag independently on what the build type is? Or must I append it to all the CMAKE_C_FLAGS_* variables?

Upvotes: 3

Views: 415

Answers (1)

Andrey Kamaev
Andrey Kamaev

Reputation: 30122

You can simply set CMAKE_C_FLAGS (or CMAKE_CXX_FLAGS for C++). They are applied for all configurations.

Upvotes: 4

Related Questions