A
A
Anton2017-08-10 11:12:48
CMake
Anton, 2017-08-10 11:12:48

How to correctly pass compilation flags to CMake?

How to correctly pass compilation options to cmake? Through CMAKE_CXX_FLAGSor through target_compile_options?
Somewhere it is written that I need to use target_compile_options, but if I need my own assembly types with their own flags , the documentation suggests using CMAKE_CXX_FLAGS_<CONFIG>.
So which way is better?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question