Skip to content

Add instructions on building as a standalone project #546

@XLXXLXXLX

Description

@XLXXLXXLX

Explain what you would like to see improved

I'm currently studying on the source code of cling. But often cmake detects something and triggers a full compilation, which can waste a lot of time. Also I checked the CMakeLists.txt to see that cling actually supports building as a stand alone project, so I wonder if cling can add some instructions in the document.

Something like this might work.

mkdir cling && cd cling
#llvm configuration
git clone https://github.com/root-project/llvm-project.git
cd llvm-project
git checkout cling-latest
mkdir llvm-build && cd llvm-build
cmake -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_TARGETS_TO_BUILD="host;NVPTX" -DCMAKE_BUILD_TYPE=Release ../llvm
cmake --build . --target all

#cling configuration
cd ..
git clone https://github.com/root-project/cling.git
cd cling && mkdir cling-build && cd cling-build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=../llvm-project/llvm-build  -DLLVM_DIR=../llvm-project/llvm-build/lib/cmake/llvm ..
cmake --build . --target cling

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions