Docs: Make CLion instructions less Googler specific
Bug: NONE Change-Id: I9fe62588a7d68d0350867c30b8cc9821a05d167d Reviewed-on: https://chromium-review.googlesource.com/c/1296685 Commit-Queue: Tommy Li <tommycli@chromium.org> Reviewed-by: Justin Donnelly <jdonnelly@chromium.org> Cr-Commit-Position: refs/heads/master@{#602431}
This commit is contained in:
@@ -9,17 +9,18 @@ Prerequisite:
|
|||||||
|
|
||||||
## Setting up CLion
|
## Setting up CLion
|
||||||
|
|
||||||
1. Install CLion
|
1. Install CLion.
|
||||||
|
- Googlers only: See
|
||||||
1. Authenticate License
|
[go/intellij-getting-started](https://goto.google.com/intellij-getting-started)
|
||||||
- https://g3doc.corp.google.com/devtools/ide/intellij/g3doc/docs/license-server.md?cl=head
|
for installation and license authentication instructions.
|
||||||
|
|
||||||
1. Run CLion
|
1. Run CLion
|
||||||
|
|
||||||
1. Increase CLion's memory allocation
|
1. Increase CLion's memory allocation
|
||||||
- This step will help performance with large projects
|
- This step will help performance with large projects
|
||||||
1. Option 1
|
1. Option 1
|
||||||
1. At the startup dialogue, in the bottom right corner, click `configure`
|
1. At the startup dialogue, in the bottom right corner, click
|
||||||
|
`Configure`.
|
||||||
1. Setup `Edit Custom VM Options`:
|
1. Setup `Edit Custom VM Options`:
|
||||||
```
|
```
|
||||||
-Xss2m
|
-Xss2m
|
||||||
@@ -38,30 +39,33 @@ Prerequisite:
|
|||||||
## Chromium in CLion
|
## Chromium in CLion
|
||||||
|
|
||||||
1. Import project
|
1. Import project
|
||||||
- At the startup dialogue, select `Import Project` and select your chromium directory
|
- At the startup dialog, select `Import Project` and select your `chromium`
|
||||||
|
directory; this should be the parent directory to `src`. Selecting `src`
|
||||||
|
instead would result in a bunch of CLion IDE files appearing in your
|
||||||
|
repository.
|
||||||
|
|
||||||
1. Modify the `CMakeList.txt` file
|
1. Modify the `CMakeLists.txt` file
|
||||||
1. Open the `CMakeList.txt` file
|
1. Open the `CMakeLists.txt` file
|
||||||
1. Add the following to the top
|
1. Add the following to the top
|
||||||
```
|
```
|
||||||
set(CMAKE_BUILD_TYPE Debug)
|
set(CMAKE_BUILD_TYPE Debug)
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||||
```
|
```
|
||||||
1. Remove any other `include_directories` the file contains
|
1. Remove any other `include_directories` the file contains. The beginning
|
||||||
- the head should look like
|
of the file should now look like:
|
||||||
```
|
```
|
||||||
cmake_minimum_required(VERSION 3.10)
|
cmake_minimum_required(VERSION 3.10)
|
||||||
project(chromium)
|
project(chromium)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
|
||||||
set(CMAKE_BUILD_TYPE Debug)
|
set(CMAKE_BUILD_TYPE Debug)
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||||
|
|
||||||
add_executable(chromium
|
add_executable(chromium
|
||||||
...)
|
...)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Building, Running, and Debugging within CLion
|
## Building, Running, and Debugging within CLion
|
||||||
|
|
||||||
@@ -107,7 +111,7 @@ For some reason, when installing 2018.1 through a package manager, it did not cr
|
|||||||
1. Run CLion through the terminal `/opt/clion-2018.1/bin/clion.sh`
|
1. Run CLion through the terminal `/opt/clion-2018.1/bin/clion.sh`
|
||||||
1. At the startup dialogue, in the bottom right corner, click `configure`
|
1. At the startup dialogue, in the bottom right corner, click `configure`
|
||||||
1. Click `Create Desktop Entry`
|
1. Click `Create Desktop Entry`
|
||||||
|
|
||||||
## Optional Performance Steps
|
## Optional Performance Steps
|
||||||
|
|
||||||
### Mark directories as `Library Files`
|
### Mark directories as `Library Files`
|
||||||
@@ -115,4 +119,4 @@ For some reason, when installing 2018.1 through a package manager, it did not cr
|
|||||||
To speed up CLion, you may optionally mark directories such as `src/third_party` as `Library Files`
|
To speed up CLion, you may optionally mark directories such as `src/third_party` as `Library Files`
|
||||||
1. Open the `Project` navigation (default `Alt 1`)
|
1. Open the `Project` navigation (default `Alt 1`)
|
||||||
1. Right click the directory > `Mark directory as` > `Library Files`
|
1. Right click the directory > `Mark directory as` > `Library Files`
|
||||||
1. See `https://blog.jetbrains.com/clion/2015/12/mark-dir-as/` for more details
|
1. See `https://blog.jetbrains.com/clion/2015/12/mark-dir-as/` for more details
|
||||||
|
Reference in New Issue
Block a user