[llvm-commits] [PATCH] cmake: make BUILD_SHARED_LIBS a visible option

Michael Spencer bigcheesegs at gmail.com
Wed Feb 1 03:20:13 PST 2012


On Mon, Jan 30, 2012 at 1:06 PM, nobled <nobled at dreamwidth.org> wrote:
> Before, this could only be specified on the commandline via
> -DBUILD_SHARED_LIBS=ON,
> and wouldn't show up as an option when invoked via `cmake -i` at all.
> It also wasn't type-checked
> as a boolean variable with only ON/OFF as valid values.
>
> ---
>  CMakeLists.txt |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 13e358a..1e7a4a3 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -94,6 +94,9 @@ else( MSVC )
>     CACHE STRING "Semicolon-separated list of targets to build, or \"all\".")
>  endif( MSVC )
>
> +option(BUILD_SHARED_LIBS
> +  "Build all libraries as shared libraries instead of static" OFF)
> +
>  option(LLVM_ENABLE_CBE_PRINTF_A "Set to ON if CBE is enabled for
> printf %a output" ON)
>  if(LLVM_ENABLE_CBE_PRINTF_A)
>   set(ENABLE_CBE_PRINTF_A 1)
> --
> 1.7.4.1

LGTM. Do you have commit access? Or should I commit it?




More information about the llvm-commits mailing list