diff --git a/cli b/cli index 1749a8f3a0f3817e78d412189c5b1fc891b7c4d3..9bef0ce5d80771afa3d498a6fd185b418ce86938 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 bc8877d98ac780ba44411589e0deb7fd910df6d1..098ab98ac0c97c7f6c46fd703c80bdd2d32ff0b1 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 8743457b5d516b5a29e3767540700c2cd52884c4..52130d34e08e7873fc6951ec2acca2f285917cce 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 3580699ff79bbcdd114568b2dd772621c42c3248..0000000000000000000000000000000000000000 --- a/src/unity_master.cpp +++ /dev/null @@ -1,5 +0,0 @@ -./include/main.hpp -./pch/std.h -./src/main.cpp -./include/pch: -std.h