From 893af951f3bb035962b76f01b6c2fa34190e48c6 Mon Sep 17 00:00:00 2001 From: l s Date: Fri, 27 Jan 2023 22:32:11 +0000 Subject: [PATCH] Revert "Added cppcheck to build and run targets" This reverts commit 21a1de18885653ce8d43db2d7b606a7eb784f2d8 --- cli | 4 ++-- meson.build | 10 ++++++---- meson_configs/common.ini | 8 ++++---- src/unity_master.cpp | 5 ----- 4 files changed, 12 insertions(+), 15 deletions(-) delete mode 100644 src/unity_master.cpp diff --git a/cli b/cli index 1749a8f..9bef0ce 100755 --- a/cli +++ b/cli @@ -259,7 +259,7 @@ def main(): elif(current_command == build): current_build_type_path = get_build_path(current_build_type, current_platform) meson_compile(current_build_type_path) - meson_cppcheck(current_build_type_path, current_platform, project_name) + meson_cppcheck(current_build_type_path, current_platform, project_name, command_line_arguments) elif(current_command == test): current_build_type_path = get_build_path(current_build_type, current_platform) @@ -268,7 +268,7 @@ def main(): elif(current_command == run): current_build_type_path = get_build_path(current_build_type, current_platform) meson_run(current_build_type_path, current_platform, project_name, command_line_arguments) - meson_cppcheck(current_build_type_path, current_platform, project_name) + meson_cppcheck(current_build_type_path, current_platform, project_name, command_line_arguments) elif(current_command == clear): current_build_type_path = get_build_path(current_build_type, current_platform) diff --git a/meson.build b/meson.build index bc8877d..098ab98 100644 --- a/meson.build +++ b/meson.build @@ -4,7 +4,10 @@ project('template', 'cpp', pch_enabled = false testing_enabled = false -source_files=files('./src/unity_master.cpp') +source_files = files('./src/main.cpp') +include_files= include_directories('./include/') +pch_files = ['./include/pch/std.h'] +precompiled_headers = pch_enabled ? pch_files : [] dep1 = dependency('', required: false) deps = [dep1] @@ -12,13 +15,12 @@ deps = [dep1] # MAIN EXECUTABLE main_project_exe = executable(meson.project_name(), sources: source_files, + include_directories: include_files, + cpp_pch: precompiled_headers, dependencies: deps ) subdir('meson_includes/main_target') -# GENERATE UNITY BUILD -subdir('meson_includes/generate_unity_build') - # IDE subdir('meson_includes/ide_target') diff --git a/meson_configs/common.ini b/meson_configs/common.ini index 8743457..52130d3 100644 --- a/meson_configs/common.ini +++ b/meson_configs/common.ini @@ -14,7 +14,7 @@ common_cpp_linker_args = common_linker_args + '' warning_level = '3' werror = true strip = false -unity = 'off' +unity = 'on' unity_size = 4096 cpp_std = 'c++2a' @@ -22,14 +22,14 @@ b_asneeeded = true b_colorout = 'always' b_coverage = true b_lundef = true -b_lto = false +b_lto = true b_lto_threads = 4 b_lto_mode = 'thin' b_thinlto_cache = true b_thinlto_cache_dir = true b_ndebug = 'false' -b_pch = false -b_pgo = 'off' +b_pch = true +b_pgo = 'generate' b_sanitize = 'address' b_staticpic = true b_pie = true diff --git a/src/unity_master.cpp b/src/unity_master.cpp deleted file mode 100644 index 3580699..0000000 --- a/src/unity_master.cpp +++ /dev/null @@ -1,5 +0,0 @@ -./include/main.hpp -./pch/std.h -./src/main.cpp -./include/pch: -std.h -- GitLab