A
A
Alex2014-01-12 06:19:36
C++ / C#
Alex, 2014-01-12 06:19:36

How to specify in cmake which c/c++ standard the compiler should use?

On my system, by default, C code is compiled in accordance with C89 (gcc), but the pow function appeared only in C99. Therefore, I need to build programs with this standard. The problem is easily solved in qmake with one line:
CONFIG += C99
But I would like to know how this is done in cmake?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladlen Grachev, 2014-01-12
@AlexTalker

Something like
or
?
From here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question