CLion use notes (c)

I have posted on this blog quite a few CLion use notes, and did not pursue it are few, tentatively counted as Title III.

My CLion it is with the MSYS2 and Conan use. MSYS2 provide C ++ toolchain. Conan as C ++ package management tool, which can be easily mounted Boost like C ++ library.

MSYS2 really a good thing. Many packages are updated quickly. I have updated obsessive-compulsive disorder. Good times daily pacman -Syuu. The GCC has just been updated to 9.1. GCC 9.1 was released May 3.

After each update GCC, GCC needs to be modified versions CLion in some places, these changes are about CMake and Conan's.

About revision of CMake

  1. Delete cmake-build-debug / CMakeCache.txt (may also be cmake-build-release / CMakeCache.txt?)
  2. File > Reload CMake Project

About revision of Conan

This step may not be necessary, but I usually do. GCC is to use the latest installation package by Conan re-build (compile) it.

It is to
click on the bottom of the window CLion Terminal label.
Terminal switching to the root of the item, and then perform

conan install . --install-folder=cmake-build-debug --build-missing '与编译器版本和编译器路径相关的参数'

According to official documents, you can put the above "with the compiler compiler version and path-related parameters," writes a configuration file, the configuration file is called Profile . Note, profile file name extension is not required.

I named profile file I use is gcc, its content is

# I define this variable to store the root direcory of GCC
GCC_BIN=D:\msys64\mingw64\bin

[settings]
os=Windows
arch=x86_64
compiler=gcc
# set compiler.version to the proper value 
compiler.version=9.1
compiler.libcxx=libstdc++11
build_type=Debug


[options]


[build_requires]

[env]
CC=$GCC_BIN\gcc
CXX=$GCC_BIN\g++

Note that, in profile, comments to be written on a separate line, can not be written at the end of a configuration line.

By introducing profile -pr option, the format is -pr=path/to/prile.

Guess you like

Origin www.cnblogs.com/Patt/p/10947385.html