Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable all compiler warnings in CLion?

I want to see all compiler warnings in CLion. I don't want them treated as errors, but I want to inspect all of them.

How can I do this?

like image 281
becko Avatar asked Aug 03 '15 14:08

becko


People also ask

Does CLion have a compiler?

Compilers In CLion, you can use GCC-based compilers, Clang, Clang-cl, Visual Studio C++ compiler, as well as IAR compiler and custom-defined compiler.

How configure CLion in C++?

In CLion, go to File | Settings | Build, Execution, Deployment | Toolchains and select the Visual Studio toolchain that you want to configure, or create a new one. Point the C Compiler and C++ Compiler fields to clang-cl.exe. CLion will suggest the paths detected automatically.

How do you run the main in CLion?

From the main menu, select Run | Show Running List. In the top-right corner of the editor, CLion shows a list with all active applications.


1 Answers

Try to set compiler flag in CMakeLists.txt:

set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")

Related question: How to enable C++11 in CLion?

like image 109
Gluttton Avatar answered Oct 16 '22 03:10

Gluttton