[CONCPP-80] set default WITH_SSL value to OpenSSL Created: 2021-04-26  Updated: 2021-04-26  Resolved: 2021-04-26

Status: Closed
Project: MariaDB Connector/C++
Component/s: General
Affects Version/s: 1.0.0
Fix Version/s: 1.0.1

Type: Bug Priority: Major
Reporter: Alexey Bychko (Inactive) Assignee: Lawrin Novitsky
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 0.5h
Original Estimate: Not Specified


 Description   

atm if cmake is called without -DWITH_SSL=OpenSSL it fails with:

-- Configuring done
CMake Error at CMakeLists.txt:419 (ADD_DEPENDENCIES):
  The dependency target "caching_sha2_password" of target
  "DEPENDENCIES_FOR_PACKAGE" does not exist.
 
 
CMake Error at CMakeLists.txt:419 (ADD_DEPENDENCIES):
  The dependency target "client_ed25519" of target "DEPENDENCIES_FOR_PACKAGE"
  does not exist.
 
 
CMake Error at CMakeLists.txt:419 (ADD_DEPENDENCIES):
  The dependency target "sha256_password" of target
  "DEPENDENCIES_FOR_PACKAGE" does not exist.
 
 
CMake Error:
  Error evaluating generator expression:
 
    $<TARGET_FILE:client_ed25519>
 
  No target "client_ed25519"
 
 
CMake Error:
  Error evaluating generator expression:
 
    $<TARGET_FILE:sha256_password>
 
  No target "sha256_password"
 
 
CMake Error:
  Error evaluating generator expression:
 
    $<TARGET_FILE:caching_sha2_password>
 
  No target "caching_sha2_password"
 
 
-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

the workaround is to specify -DWITH_SSL=OpenSSL explicitly in command line



 Comments   
Comment by Lawrin Novitsky [ 2021-04-26 ]

I've actually pushed that yesterday. You might want to rebase your branch. Or if you did that, and my fix does not work, then please re-open the issue

Comment by Alexey Bychko (Inactive) [ 2021-04-26 ]

rebased, the issue is still there:

382 ADD_CUSTOM_TARGET(DEPENDENCIES_FOR_PACKAGE)
383 IF("${WITH_SSL}" STREQUAL "")
384   SET(WITH_SSL ON)
385 ENDIF()

Comment by Lawrin Novitsky [ 2021-04-26 ]

Pushed the fix in f2c4dd7. It happens, that that had to be CONC_WITH_SSL, rather than WITH_SSL, to take effect with C/C
The default should not be OPENSSL - C/C picks own defaults for encryption library, if WITH_SSL is ON. For non-Windows that is OpenSsl at the moment anyway.

Generated at Thu Feb 08 03:08:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.