Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set C11 as default Language in Clion

Tags:

c

default

clion

I'm studying C at the university and I just downloaded Clion; How can I change the default language so that every project I create will be ready to work?

like image 506
Tsadoq Avatar asked Sep 22 '16 15:09

Tsadoq


1 Answers

Depending on the version of Clion you will either see the CMakeLists.txt contain something like

set(CMAKE_CXX_FLAGS "-std=c++11")

or for recent EAP builds

set(CMAKE_CXX_STANDARD 11)

Simply change the variables and flags to the correct ones for C.

There's currently no way (that I know of) to make it use C language as default for new projects. You must manually edit the project CMakeLists.txt file.


With recent versions of CLion you can now create C projects as well, making this answer somewhat obsolete.

like image 180
Some programmer dude Avatar answered Sep 28 '22 07:09

Some programmer dude