@@ -4,6 +4,7 @@ project ("cc_ublox_cc_tools_qt_plugin")
44# Build options:
55option (OPT_WARN_AS_ERR "Treat warnings as errors" ON )
66option (OPT_USE_CCACHE "Use ccache" OFF )
7+ option (OPT_WITH_DEFAULT_SANITIZERS "Build with sanitizers" OFF )
78option (OPT_INSTALL_DEFAULT_CONFIG "Install default plugin configuration" ON )
89
910# Configuration variables:
@@ -45,6 +46,10 @@ if (OPT_USE_CCACHE)
4546 endif ()
4647endif ()
4748
49+ if (OPT_WITH_DEFAULT_SANITIZERS)
50+ list (APPEND extra_opts DEFAULT_SANITIZERS)
51+ endif ()
52+
4853include (${LibComms_DIR} /CC_Compile.cmake )
4954cc_compile (${extra_opts} )
5055cc_msvc_force_warn_opt (/W4 )
@@ -481,7 +486,7 @@ function (cc_plugin_core)
481486 target_compile_options (${name} PRIVATE
482487 $<$<CXX_COMPILER_ID :MSVC >:/bigobj /wd4127 /wd5054 >
483488 $<$<CXX_COMPILER_ID :GNU >:-ftemplate -depth =2048 -fconstexpr -depth =4096 -Wno -unused -local -typedefs >
484- $<$<CXX_COMPILER_ID :Clang >:-ftemplate -depth =2048 -fconstexpr -depth =4096 -Wno -unused -local -typedefs >
489+ $<$<CXX_COMPILER_ID :Clang >:-ftemplate -depth =2048 -fconstexpr -depth =4096 -fbracket - depth =2048 - Wno -unused -local -typedefs >
485490 )
486491
487492endfunction ()
@@ -526,7 +531,7 @@ function (cc_plugin protocol has_config_widget)
526531 target_compile_options (${name} PRIVATE
527532 $<$<CXX_COMPILER_ID :MSVC >:/bigobj /wd4127 /wd5054 >
528533 $<$<CXX_COMPILER_ID :GNU >:-ftemplate -depth =2048 -fconstexpr -depth =4096>
529- $<$<CXX_COMPILER_ID :Clang >:-ftemplate -depth =2048 -fconstexpr -depth =4096>
534+ $<$<CXX_COMPILER_ID :Clang >:-ftemplate -depth =2048 -fconstexpr -depth =4096 - fbracket - depth =2048 >
530535 )
531536
532537 install (
0 commit comments