clMathLibraries / clBLAS

a software library containing BLAS functions written in OpenCL
Apache License 2.0
839 stars 240 forks source link

Make installing source tree optional #252

Closed hughperkins closed 8 years ago

hughperkins commented 8 years ago

Make installing source tree optional

Addresses https://github.com/clMathLibraries/clBLAS/issues/248


This change is Reviewable

hughperkins commented 8 years ago

(Installing 7349 tiny files each time totally trashes my flash drive by the way, apart from being really sllooowwww)

kknox commented 8 years ago

@hughperkins I agree with you; I would like to ask if you could default the option to OFF, then I'll merge. Installing the source was only meant as an internal team debug aid, and I can see that it would cause a lot of headaches for others.

hughperkins commented 8 years ago

Cool! Sounds good. Updated.

kknox commented 8 years ago

I don't remember seeing that .gitignore file yesterday, I think it was just committed today. Could you remove it from the commit? I don't want to encourage folks to do in-place cmake builds, but obviously its fine for you to do that in your own fork.

hughperkins commented 8 years ago

Fair enough :-) Updated

hughperkins commented 8 years ago

I guess you're pondering how come the src/build/ is still there :-P ?

git blame .gitignore | tail -n 3
3681c788 (Hugh Perkins 2015-10-28 21:40:30 +0800 26) 
3681c788 (Hugh Perkins 2015-10-28 21:40:30 +0800 27) src/build/
3681c788 (Hugh Perkins 2015-10-28 21:40:30 +0800 28) 

If you want I can revert the earlier change to .gitignore? What is the reason why you want to discourage in-tree builds by the way?

kknox commented 8 years ago

Oh, I see, it's already in there. Nevermind, I’ll remove it later in my next check-in.

Reasoning While cmake supports both in-source and out-of-source builds, they more or less recommend that people follow out-of-source: https://cmake.org/Wiki/CMake_FAQ#Out-of-source_build_trees For instance, cmake does not provide a distclean target as they assume that the user will wipe the build directory to start a fresh build.

You are actually doing an out of source build, it just happens that the root of your build tree is in the source tree. It's not a terrible thing, but you end up putting custom paths in the .gitignore file like you did. That particular build build path has no meaning to this project, or other users. I would prefer custom paths such as this stay in your fork; it doesn't need to live upstream.

hughperkins commented 8 years ago

You are actually doing an out of source build, it just happens that the root of your build tree is in the source tree. It's not a terrible thing, but you end up putting custom paths in the .gitignore file like you did.

Well, it only needs one path, ie build*/ It's pretty standard, eg see: