Closed gabyx closed 9 years ago
I slightly changed the executable names in the CMAKE build
acciv.exe -> acciv (under unix/ windows i think appends .exe)
makeGeometryFactors.exe -> acciv-makeGeometryFactors makeVideo.exe -> acciv-makeVideo smoothFit.exe -> acciv-smoothFit
This is better if one wants to install all binaries with cmake, such these tools have common naming, and we know to which library (acciv) it belongs
Hi @gabyx,
Thanks for adding cmake support. I don't know anything about cmake so I'll basically have to trust you that it works... I'm fine with the various name changes.
I'm also good with the return value. That makes sense to fix.
Can you explain why you put makefiles and a CMakeLists.txt in the root directory? My organization (which I won't claim adheres to any standard practices) was that the code lived in "acciv" folder (which should probably be "src") and that the make stuff belonged there, too. Even if there's a good reason to move the example makefiles into the root directory, I think they would need to be altered to refer either to the Makefile in the acciv folder or to use paths.
Could you remove or fix Makefile-default and Makefile-mac in the root so I can merge the pull request?
Thanks, Xylar
Jeah, you are right, what I have seen from other projects is (dont take that for granted :-) that its always good to have a CMakeLists.txt file in the root folder, so people just see, Ahh I can build that with cmake, thats easy :-), if I see a makefile, I anyway have to look into the makefile, change paths and so on till it works, the makefiles for me :-) are just old school, I mean cool if one can write those kind of files, but its always a pain for larger projects, and there are so good tools (like cmake, ninja, jam,premake) out there, i prefere cmake for c/c++ projects. nevertheless its good to still have them in the folder, and I honestly have no idea why they should or shouldnt be in the root folder :-), they can also reside in the "src" or "scripts" directory, but what I have seen from lots of projects, build stuff never goes into the src folder, also the .sln visual studio project would never go there, for my taste: source is source, build stuff is somewhere else but not int the src or include directory... if you would like to support multiple build stuff ( I would not , I would only stick to cmake, because you can generate all stuff out of it, makefiles, visual studio project files, eclipse, codeblocks, what ever) and thats the power of using cmake :-)
I am sorry about not have changed the make files, but I dont know, if there is already a cmake file, why still supporting make :-) because its redundant anyway .-) but thats a point of view, I mean its your code :-) you need to decide, I am just making a big add for cmake :-) (because its awsome :-)) I can also improve the cmake, comment it and so such that it is simple and easy to use (which it is almost)
by the way cmake handles all dependencies quite well, look in the CMakeList file find_package(...) awesome :-), of course there is a cmake/FindFFTW.cmake script added to find FFTW which is not officially built in by cmake already, HDF5 find script is already somewhere installed ...
Do you actually use Utlities.a library somewhere else, because this library is build static and will not be installed in the system for the cmake stuff (when you do make install
) , as well as the header files besides it wont be installed.
its really easy to use cmake,
what you do is, download the the cmake-gui or command line version. you make a build folder somewhere (not in the git repository)
mkdir build
cd build
cmake ../../../accivRepo/ -DCMAKE_INSTALL_PREFIX=/usr/local/mySuperbInstallFolder
make
make install
(CMAKE_INSTALL_PREFIX is set by default to /usr/local on unix systems)
with the cmake-gui its easy to see all the cache values , found libraries and so on... check it out :-)
the cmake script I wrote is just boringly simple, and it works, it is not the most elaborate cmake script... I could improve it if you like
What do you think about the makefiles? Still moving them into the src =)? Really? I would rather update them and leave them in the root folder ;)
BR Gabriel
Hi @gabyx,
I appreciate your enthusiasm for cmake but I don't really have a need or interest in learning it myself. This is a really simple build setup and it just doesn't need any fancy tools, however cool they may be.
I'm happy to add your files for supporting cmake into the acciv directory but I'm not really interested in getting into any further reorganization of the code or the build system. I'd like to keep the root directory cleanly -- only the code and the tests (and the license).
I've used the utility library in a few other codes in the distant past, but I don't see any real value in installing it as a system library. It's much simpler to copy it into whatever code needs it, given that it's not something I plan to update or maintain.
Hi @gabyx,
If you just delete the Makefile-mac and Makefile-default from the root, I'll be glad to merge the pull request as it is.
-Xylar
no worries, I moved the make files back,
gabriel
cheers :-)