noloader / cryptopp-cmake

CMake files for Crypto++ project
BSD 3-Clause "New" or "Revised" License
92 stars 68 forks source link

Wrong value for CRYPTOPP_DATA_DIR compiler definition #92

Closed abdes closed 2 years ago

abdes commented 2 years ago

The CRYPTOPP_DATA_DIR value needs to be a quoted string as it is used as such in the code.

It also should not have the TestData path segment in it as it is already part of the file names in the code, which are appended with a separator after CRYPTOPP_DATA_DIR.

Suggestion for fix:

set(CRYPTOPP_DATA_DIR "\"${CRYPTOPP_PROJECT_DIR}\"" CACHE PATH "Crypto++ test data directory")
noloader commented 2 years ago

@abdes,

Thanks for the cleanup.

But a word of caution... Changing the directory structure likely broke a lot of folks who depend on that. I know it broke our test scripts. Please don't do that. We are not a web project that breaks stuff between releases.

abdes commented 2 years ago

Actually the change was made according to the test cases source code which expect that compiler symbol to be defined as in the update :-). I also tested it. Please allow these changes so that we get a maintainable cmake script.

abdes commented 2 years ago

[ctest] Test project D:/dev/projects/cryptopp-cmake/build [ctest] Start 2: build_cryptest [ctest] Start 1: standard-cpm [ctest] 1/3 Test #2: build_cryptest ................... Passed 0.07 sec [ctest] Start 3: cryptest [ctest] 2/3 Test #1: standard-cpm ..................... Passed 22.62 sec [ctest] 3/3 Test #3: cryptest ......................... Passed 72.04 sec [ctest] [ctest] 100% tests passed, 0 tests failed out of 3 [ctest] [ctest] Total Test time (real) = 72.36 sec [ctest] CTest finished with return code 0