Skip to content

Commit

Permalink
ENH: Make conditional compilations
Browse files Browse the repository at this point in the history
Hide unused options when they are not
relevant for a build.
  • Loading branch information
hjmjohnson committed Mar 18, 2022
1 parent a96d03f commit 1610321
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions Utilities/Doxygen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ set( ITK_DOXYGEN_OUTPUT_DIR ${ITK_BINARY_DIR}/Utilities/Doxygen )

set( ITK_DOXYGEN_DIAGRAMS YES )

option( ITK_DOXYGEN_HTML "Doxygen will generate HTML Output" ON )
option( ITK_DOXYGEN_DOCSET "Doxygen will generate additional index files for Xcode 3" OFF )
option( ITK_DOXYGEN_CHM "Doxygen will generate Microsoft HTML help" OFF )
option( ITK_DOXYGEN_QHP "Doxygen will generate Qt Compressed Help" OFF )
option( ITK_DOXYGEN_ECLIPSEHELP "Doxygen will generate Eclipse help plugin" OFF )
option( ITK_DOXYGEN_LATEX "Doxygen will generate LaTeX output" OFF )
option( ITK_DOXYGEN_RTF "Doxygen will generate RTF output optimized for Word 97" OFF )
option( ITK_DOXYGEN_XML "Doxygen will generate XML output" OFF )
cmake_dependent_option( ITK_DOXYGEN_HTML "Doxygen will generate HTML Output" ON "ITK_BUILD_DOCUMENTATION" OFF)
cmake_dependent_option( ITK_DOXYGEN_DOCSET "Doxygen will generate additional index files for Xcode 3" OFF "ITK_BUILD_DOCUMENTATION" OFF)
cmake_dependent_option( ITK_DOXYGEN_CHM "Doxygen will generate Microsoft HTML help" OFF "ITK_BUILD_DOCUMENTATION" OFF)
cmake_dependent_option( ITK_DOXYGEN_QHP "Doxygen will generate Qt Compressed Help" OFF "ITK_BUILD_DOCUMENTATION" OFF)
cmake_dependent_option( ITK_DOXYGEN_ECLIPSEHELP "Doxygen will generate Eclipse help plugin" OFF "ITK_BUILD_DOCUMENTATION" OFF)
cmake_dependent_option( ITK_DOXYGEN_LATEX "Doxygen will generate LaTeX output" OFF "ITK_BUILD_DOCUMENTATION" OFF)
cmake_dependent_option( ITK_DOXYGEN_RTF "Doxygen will generate RTF output optimized for Word 97" OFF "ITK_BUILD_DOCUMENTATION" OFF)
cmake_dependent_option( ITK_DOXYGEN_XML "Doxygen will generate XML output" OFF "ITK_BUILD_DOCUMENTATION" OFF)

mark_as_advanced( ITK_DOXYGEN_HTML
ITK_DOXYGEN_DOCSET
Expand Down
6 changes: 3 additions & 3 deletions Wrapping/Generators/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ endmacro()

###############################################################################
# ccache management. This option is shared by most of generators, so put it here.
option(ITK_USE_CCACHE "Use ccache to cache swig/castxml/... output and speedup the rebuild." OFF)
cmake_dependent_option(ITK_USE_CCACHE "Use ccache to cache swig/castxml/... output and speedup the rebuild." OFF ITK_WRAP_PYTHON OFF)
mark_as_advanced(ITK_USE_CCACHE)
if(ITK_USE_CCACHE)
find_program(CCACHE_EXECUTABLE NAMES ccache-swig ccache DOC "ccache executable.")
Expand All @@ -48,7 +48,7 @@ else()
else()
set(${module_prefix}_WRAP_CASTXML ON CACHE BOOL "Build xml files.")
endif()
option(${module_prefix}_WRAP_SWIGINTERFACE "Build swig interfaces." ON)
cmake_dependent_option(${module_prefix}_WRAP_SWIGINTERFACE "Build swig interfaces." ON ITK_WRAP_PYTHON OFF)
mark_as_advanced(${module_prefix}_WRAP_CASTXML ${module_prefix}_WRAP_SWIGINTERFACE)
endif()

Expand All @@ -63,7 +63,7 @@ foreach(lang ${_candidate_generators})

# add the language to the options
if(NOT DEFINED ${module_prefix}_WRAP_${lang_upper})
option(${module_prefix}_WRAP_${lang_upper} "Build swig ${lang} wrapper support." OFF)
cmake_dependent_option(${module_prefix}_WRAP_${lang_upper} "Build swig ${lang} wrapper support." OFF ITK_WRAP_PYTHON OFF)
endif()
# add the language to the list, if the user have turn it on, and include
# the subdirectory
Expand Down

0 comments on commit 1610321

Please sign in to comment.