Add CMake option to set wxDEBUG_LEVEL
It is no use adding it to the generated setup.h because this section is commented out, so add it as compiler option instead. The default option is 'Default' in which case no compiler option is added.
This commit is contained in:
@@ -121,6 +121,10 @@ if(wxUSE_ON_FATAL_EXCEPTION AND MSVC AND (MSVC_VERSION GREATER 1800) )
|
|||||||
add_compile_options("/EHa")
|
add_compile_options("/EHa")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT wxBUILD_DEBUG_LEVEL STREQUAL "Default")
|
||||||
|
add_compile_options("-DwxDEBUG_LEVEL=${wxBUILD_DEBUG_LEVEL}")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Constants for setup.h creation
|
# Constants for setup.h creation
|
||||||
set(wxUSE_STD_DEFAULT ON)
|
set(wxUSE_STD_DEFAULT ON)
|
||||||
if(wxUSE_UNICODE)
|
if(wxUSE_UNICODE)
|
||||||
|
@@ -23,6 +23,9 @@ wx_option(wxBUILD_COMPATIBILITY
|
|||||||
set(wxBUILD_CUSTOM_SETUP_HEADER_PATH "" CACHE PATH "Include path containing custom wx/setup.h")
|
set(wxBUILD_CUSTOM_SETUP_HEADER_PATH "" CACHE PATH "Include path containing custom wx/setup.h")
|
||||||
mark_as_advanced(wxBUILD_CUSTOM_SETUP_HEADER_PATH)
|
mark_as_advanced(wxBUILD_CUSTOM_SETUP_HEADER_PATH)
|
||||||
|
|
||||||
|
wx_option(wxBUILD_DEBUG_LEVEL "Debug Level" Default STRINGS Default 0 1 2)
|
||||||
|
mark_as_advanced(wxBUILD_DEBUG_LEVEL)
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
wx_option(wxBUILD_USE_STATIC_RUNTIME "Link using the static runtime library" OFF)
|
wx_option(wxBUILD_USE_STATIC_RUNTIME "Link using the static runtime library" OFF)
|
||||||
wx_option(wxBUILD_MSVC_MULTIPROC "Enable multi-processor compilation for MSVC")
|
wx_option(wxBUILD_MSVC_MULTIPROC "Enable multi-processor compilation for MSVC")
|
||||||
|
Reference in New Issue
Block a user