yrnkrn / zapcc

zapcc is a caching C++ compiler based on clang, designed to perform faster compilations
Other
1.25k stars 60 forks source link

CMAKE_INSTALL_PREFIX doens't work for install #4

Closed PhilipDeegan closed 6 years ago

yrnkrn commented 6 years ago

That's odd. zapcc does not modify anything related to CMAKE_INSTALL_PREFIX. Does CMAKE_INSTALL_PREFIX work for you when building & installing clang?

PhilipDeegan commented 6 years ago

Let me try again - I normally build clang DCMAKE_INSTALL_PREFIX but this time I used CMAKE_INSTALL_PREFIX:PATH

both should work I think

what seems odd is that "most" of the binaries end up in the correct directory, just "zapcc" doesn't so the symlinks are broken, also when I cp "zapcc" to the PREFIX directory, it complains on launch about

startServer error: execl failed return code -1

PhilipDeegan commented 6 years ago

Seems the same

yrnkrn commented 6 years ago

Do 8ce63e87bb647f1e8d85a7db7790bfdbd56e8f8c and 7373f85af629789fdf1d6ab907333e033f2b4234 fix this?

PhilipDeegan commented 6 years ago

It does indeed thanks!

Last unrelated point

I think you need to change the README.md from

mkdir build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_WARNINGS=OFF ../llvm
ninja

to

mkdir build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_WARNINGS=OFF ..
ninja

The former only builds llvm and not zapcc whereas the latter builds both - unless I'm mistaken

yrnkrn commented 6 years ago

It's cleaner to have the build directory outside the cloned sources, like this:

---+llvm
   +build

clarified in faccefa7eda1a32b4ee383142b05224bfed0afc8:

git clone https://github.com/yrnkrn/zapcc.git llvm
mkdir build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_WARNINGS=OFF ../llvm
ninja