diff --git a/SConscript b/SConscript index e0739ec..96b1098 100644 --- a/SConscript +++ b/SConscript @@ -547,6 +547,7 @@ vars.Add('LINKFLAGS', 'Linker Flags') vars.Add('PYTHON', 'Python Executable', 'python') vars.Add('COMPILATIONDB_FILTER_FILES', 'Removes source files from the compilation DB that are not from the current' ' project.', config['COMPILATIONDB_FILTER_FILES']) +vars.Add('SHOW_INCLUDES', 'Show include hierarchy (for debugging).', False) tools = ['default', 'compilation_db', 'unity_build'] if 'TOOLS' in config: @@ -716,6 +717,8 @@ elif env['COMPILER_FAMILY'] == 'cl': f'/std:{cxx_version_name}', '/permissive-', '/EHsc', '/FS', '/Zc:char8_t', '/utf-8']) env.Append(CPPDEFINES = ['_CRT_SECURE_NO_WARNINGS']) # I'd like to not use MSVC specific versions of functions because they are "safer" ... env.Append(DEPS_CXXFLAGS = ['/EHsc', '/Zc:char8_t', '/utf-8', '/vmg']) + if env['SHOW_INCLUDES']: + env.Append(CCFLAGS = ['/showIncludes']) if build_type == 'debug': env.Append(CCFLAGS = ['/Od', '/Zi', '/MDd'], LINKFLAGS = ' /DEBUG') env.Append(CPPDEFINES = ['_DEBUG', '_ITERATOR_DEBUG_LEVEL=2'])