From 48752abaec740220f20c17937906c9bad45ae779 Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Fri, 14 May 2010 17:02:49 -0700 Subject: [PATCH] Bring OPTION() back --- cmake/modules/FindMooCmake.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmake/modules/FindMooCmake.cmake b/cmake/modules/FindMooCmake.cmake index b315d2a5..ae4f8334 100644 --- a/cmake/modules/FindMooCmake.cmake +++ b/cmake/modules/FindMooCmake.cmake @@ -1,4 +1,4 @@ -SET(MOO_DEV_MODE_CMAKE OFF CACHE BOOL "Enable developer mode for cmake - bunch of checks, warnings, etc.") +OPTION(MOO_DEV_MODE_CMAKE "Enable developer mode for cmake - bunch of checks, warnings, etc." OFF) MARK_AS_ADVANCED(MOO_DEV_MODE_CMAKE) IF(MOO_DEV_MODE_CMAKE) @@ -385,10 +385,12 @@ MACRO(MOO_OPTION variable dfltval helpstring) SET(_moo_option_header) SET(_moo_option_define) MOO_COLLECT_SIMPLE_ARGS(HIDDEN _moo_option_hidden HEADER _moo_option_header DEFINE _moo_option_define ARGN ${ARGN}) - SET(${variable} "${dfltval}" CACHE BOOL "${helpstring}") - IF(_moo_option_hidden) + IF(NOT _moo_option_hidden) + OPTION(${variable} "${helpstring}" "${dfltval}") + ELSE(NOT _moo_option_hidden) + SET(${variable} "${dfltval}" CACHE BOOL "${helpstring}") MARK_AS_ADVANCED(${variable}) - ENDIF(_moo_option_hidden) + ENDIF(NOT _moo_option_hidden) IF(_moo_option_header) # MOO_DEBUG(${variable}) MOO_DEFINE_H(${variable} "${helpstring}")