# How to compile -DCMAKE\_USE\_OPENSSL=OFF

**URL:** https://discourse.cmake.org/t/how-to-compile-dcmake-use-openssl-off/1271
**Category:** Usage
**Created:** [May 26, 2020, 4:22pm UTC](https://discourse.cmake.org/t/how-to-compile-dcmake-use-openssl-off/1271 "2020-05-26T16:22:09Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![machiel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/f05b48/32.png) [@machiel](https://discourse.cmake.org/u/machiel)
#### Post date: [May 26, 2020, 4:22pm UTC](https://discourse.cmake.org/t/how-to-compile-dcmake-use-openssl-off/1271/1 "2020-05-26T16:22:09Z")

</div>

Hi,

I tried installing cmake with the command “./bootstrap”.  
I get this error message:

CMake Error at Utilities/cmcurl/CMakeLists.txt:454 (message):  
Could not find OpenSSL. Install an OpenSSL development package or  
configure CMake with -DCMAKE\_USE\_OPENSSL=OFF to build without OpenSSL.

I guess I don’t need OpenSLL, so fine, I could run configure with this flag, but how do I do this? Do I have put this somewhere in a file, or do something else?  
I tried running “./bootstrap -DCMAKE\_USE\_OPENSSL=OFF” but that didn’t work.

Regards,

Machiel

---

<div class="post-metadata">

### Author: ![marc.chevrier](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/ecb155/32.png) [@marc.chevrier](https://discourse.cmake.org/u/marc.chevrier)
#### Post date: [May 26, 2020, 4:42pm UTC](https://discourse.cmake.org/t/how-to-compile-dcmake-use-openssl-off/1271/2 "2020-05-26T16:42:04Z")

</div>

`bootstrap --help` gives the answer:  
`Usage: ./bootstrap [<options>...] [-- <cmake-options>...]`

`-DCMAKE...` is a `cmake` option so you have to specify it this way:  
`bootstrap <options> -- -DCMAKE_USE_OPENSSL=OFF`

---

<div class="post-metadata">

### Author: ![machiel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/f05b48/32.png) [@machiel](https://discourse.cmake.org/u/machiel)
#### Post date: [May 26, 2020, 5:18pm UTC](https://discourse.cmake.org/t/how-to-compile-dcmake-use-openssl-off/1271/3 "2020-05-26T17:18:48Z")

</div>

Thank you. Now it works.  
Thank you very much,

---

<div class="post-metadata">

### Author: ![liuchonggroup](https://discourse.cmake.org/user_avatar/discourse.cmake.org/liuchonggroup/32/2620_2.png) [@liuchonggroup](https://discourse.cmake.org/u/liuchonggroup)
#### Post date: [July 26, 2022, 8:43am UTC](https://discourse.cmake.org/t/how-to-compile-dcmake-use-openssl-off/1271/4 "2022-07-26T08:43:34Z")

</div>

I have not get the solution, what should be filled into the ?

---

<div class="post-metadata">

### Author: ![Arcadia](https://discourse.cmake.org/user_avatar/discourse.cmake.org/arcadia/32/4282_2.png) [@Arcadia](https://discourse.cmake.org/u/Arcadia)
#### Post date: [March 14, 2024, 9:12am UTC](https://discourse.cmake.org/t/how-to-compile-dcmake-use-openssl-off/1271/5 "2024-03-14T09:12:16Z")

</div>

For anyone encountering the same issue:

Ultimately, the option has to be included when calling configure, but by two preceding hyphens.

`./configure -- -DCMAKE_USE_OPENSSL=OFF`

---

<div class="post-metadata">

### Author: ![rogerdpack](https://discourse.cmake.org/user_avatar/discourse.cmake.org/rogerdpack/32/5533_2.png) [@rogerdpack](https://discourse.cmake.org/u/rogerdpack)
#### Post date: [April 26, 2025, 4:06pm UTC](https://discourse.cmake.org/t/how-to-compile-dcmake-use-openssl-off/1271/6 "2025-04-26T16:06:45Z")

</div>

`./bootstrap -- -DCMAKE_USE_OPENSSL=OFF`

or for completeness another option: if you happen to have a different version of cmake installed (ex; upgrading)

` cmake . -DCMAKE_USE_OPENSSL=OFF`
