CLion Help

OS X Specific Adjustments

CLion utilizes CMake default compiler - Clang and GDB as the debugging back end. Such a combination implies some limitation to OS X projects debugging. In particular, it refers to viewing the content of STL containers. Examples below demonstrate how you can overcome these limitations using CMake commands and settings:

  1. Currently, if you need to view the content of STL containers in OS X debugger, please use the libstdc++ instead of libc++. To include libstdc++ in your OS X project, do one of the following:
    • add the following command in CMakeLists.txt file:
      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++")
    • In CMake options field of CMake Settings dialog, specify the library to be included:
      -D CMAKE_CXX_FLAGS = "-stdlib=libstdc++"
  2. We recommend you to keep on dwarf3 debug info format. To do that, add the following commands to CMakeLists.txt file:

See Also

Language and Framework-Specific Guidelines:

Web Resources:

Last modified: 27 June 2015