Add BUILD_SHARED_LIBS as an option

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Add BUILD_SHARED_LIBS as an option

Mateusz Loskot

The docs [1] say:

"This variable [BUILD_SHARED_LIBS] is often added to projects as an option()"


Does that literally mean adding the option this way?

option(BUILD_SHARED_LIBS "Build shared library" OFF)

Or, adding an extra level of indirection via custom option:

option(XXX_BUILD_SHARED "Build shared library" OFF)


I do realise it's question about docs pedantism, but I'd like to get
that cleared once for good :)
I'm trying to cut number of custom options and I'm never certain
how I can actually re/ab-use the standard CMake settings.

Best regards,
Mateusz Loskot,

Powered by

Please keep messages on-topic and check the CMake FAQ at:

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe:
Mateusz Loskot