New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake build #77
CMake build #77
Conversation
1f28c94
to
b91cb64
Compare
This is a very good start. Thank you very much. CMakeLists.txt, Lines 19-31, can go away. Future versions of the library will apply Folks who want unaligned data access will have to specifically set I'm not sure about CMakeLists.txt, Lines 120-125. This is due to my ignorance.
So we are clear... I believe the intention in the GNUmakefile is Unix-on-Windows tools like Cygwin and MinGW. MinGW requires the Winsock library This is something you may want to test in a VM to be sure. I'm not sure about CMakeLists.txt, Lines 125-130.
On OS X, there are no thread libraries used. See Crypto++ build on OS X 10.8. You might consider dropping Doxygen support. 5.6.2 and earlier did not have the make-based support. I believe Wei was generating it by hand in a one-off fashion. We added the make-based stuff at 5.6.3 to ensure consistency and reproducible results. It was a QA thing. If I did not need to generate the docs, then I'd avoid it altogether. (I think you have this choice). travis.yaml concerns me.
Effectively, we are introducing external dependencies. In addition, we are asking folks to trust someone named George Edison 55. Can they be removed? I'm not sure about this in travis.yaml:
The library supports a wide array or compilers, including MSVC, GCC, Intel ICC, Sun Studio, etc. I'm not sure limiting to GCC 5+ is a good idea. In fact, I've seen a lot of problems with the experimental compilers like 5.2 and 5.3. I know they have inlining and devirtualization bugs, and I have spent a couple hundred hours trying to track them down on platforms like Debian/Aarch64.
My apologies if I am parsing things incorrectly.
Copying I think that's enough for round one. I'll get it into the testing loop, and then the real fun will begin. (Testing sucks at times. For every half hour I spend producing something, I spend hours testing it). |
This is now up for debate at CmakeList.txt Pull Request. |
Fair point, done
WIN32 is not defined in Cygwin using CMake version higher then (2.8.4). CMakeLists.txt requires 3.2 explicitly.
Well, using Travis is not mandatory. It will not be able to cover all the testing needs, like running Windows builds using MSVC. Maybe, it will be better to remove Travis builds it at this point.
Yes, me too, but I try to adapt building the library for Debian+Ubuntu, and libraries are required to have Now, if you want to generate dogumentation, you must explicitly set
It has some substitution characters in file paths (between "@" characters)
Tried to fix this thing in current version of commit. Now the documentation is built in-source, and then copied to build directory, eliminating the need of Doxyfile.in |
4cc1bd5
to
af52c93
Compare
Rebased to include new commits. |
Rebased again. People are not enthusiastic about CMake here =/ |
@alexander - I was able to test this on a machine with Cmake. Is this expected? Shouldn't Cmake "just work" like Make and Gmake? _OS X running 3.4.1_:
_Ubuntu 14 running 2.8.12_:
According to Running Cmake:
Unfortunately, it did not build and it did not produce the artifact:
We really need you guys to own this. There are folks who don't like Cmake, and they will be ping'ing me offline to remove it if it does not work. |
CMake requires entering source directory, so use |
@GamePad64 - At commit 79882d4 I added Cmake artifacts to the GNUMakefile's _ |
Hello,
I have added CMake build, as mentioned in #73.
Building static+shared library.
-DCMAKE_POSITION_INDEPENDENT_CODE=ON/OFF
CRYPTOPP_NO_UNALIGNED_DATA_ACCESS
orCRYPTOPP_INIT_PRIORITY
not defined in config.hDISABLE_ASM
,DISABLE_SSSE3
andDISABLE_AESNI
are not set automatically right now (using compiler detection), so they are made as CMake options.Building tests (cryptest).
The test can be built and performes, if
BUILD_TESTING
is set toON
(default).Command:
make test
Building documentation using Doxygen.
I had to create a new file,
Doxyfile.in
, as Doxygen can't make out-of-source builds. This is the right way to do this in CMake, but we may have to maintain it 馃槙The build yields CryptoPPRef.zip, containing all documentation, generated by Doxygen (just like GNUmakefile build).
Install.
On
make install
CMake installs a package, that could be used by other projects, usingFindPackage(cryptopp)
, eliminating the need ofFindCryptoPP.cmake
module.Also,
make install
just installs the libraries inlib
, includes ininclude
, and documentation inshare/doc
, honoring FHS on Linux.Also, I've added a working
.travis.yml
file for Travis-CI, if you ever want to use it.