Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitafff3dd

Browse files
authored
Compilation speedup (#211)
1 parent19fcd4e commitafff3dd

File tree

29 files changed

+109
-113
lines changed

29 files changed

+109
-113
lines changed

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,11 @@ _BuildCC_ is licensed under the Apache License, Version 2.0. See [LICENSE](LICEN
170170

171171
>Developers who would like to suggest an alternative library, raise an issue with the**license** and**advantages** clearly outlined.
172172
173-
-[Fmtlib](https://github.com/fmtlib/fmt) (Formatting)[MIT License][Header Only]
174-
-[Spdlog](https://github.com/gabime/spdlog) (Logging)[MIT License][Header Only]
173+
-[Fmtlib](https://github.com/fmtlib/fmt) (Formatting)[MIT License]
174+
-[Spdlog](https://github.com/gabime/spdlog) (Logging)[MIT License]
175175
-[Tiny Process Library](https://gitlab.com/eidheim/tiny-process-library) (Process handling)[MIT License]
176176
-[Taskflow](https://github.com/taskflow/taskflow) (Parallel Programming)[MIT License][Header Only]
177177
- See also[3rd-Party](https://github.com/taskflow/taskflow/tree/master/3rd-party) used by Taskflow
178-
-[Flatbuffers](https://github.com/google/flatbuffers) (Serialization)[Apache-2.0 License][Header Only]
178+
-[Flatbuffers](https://github.com/google/flatbuffers) (Serialization)[Apache-2.0 License]
179179
-[CLI11](https://github.com/CLIUtils/CLI11) (Argument Parsing)[BSD-3-Clause License][Header Only]
180180
-[CppUTest](https://github.com/cpputest/cpputest) (Unit Testing/Mocking)[BSD-3-Clause License]

‎buildcc/CMakeLists.txt‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,19 @@ if(${BUILDCC_BUILD_AS_SINGLE_LIB})
1111
$<INSTALL_INTERFACE:${BUILDCC_INSTALL_HEADER_PREFIX}>
1212
)
1313
target_link_libraries(buildccPUBLIC
14-
fmt::fmt-header-only
15-
flatbuffers_header_only
14+
fmt::fmt
15+
flatbuffers
1616
Taskflow
1717
CLI11::CLI11
1818
)
1919
target_link_libraries(buildccPRIVATE
20-
spdlog::spdlog_header_only
20+
spdlog::spdlog
2121
tiny-process-library::tiny-process-library
2222
)
2323
target_compile_options(buildccPRIVATE${BUILD_COMPILE_FLAGS})
2424
target_link_options(buildccPRIVATE${BUILD_LINK_FLAGS})
2525
if(${BUILDCC_PRECOMPILE_HEADERS})
2626
target_precompile_headers(buildccINTERFACE buildcc.h)
27-
target_precompile_headers(buildccINTERFACE${FBS_DIR}/pch/pch.h)
2827
endif()
2928
endif()
3029

@@ -65,7 +64,6 @@ if (${BUILDCC_BUILD_AS_INTERFACE})
6564
)
6665
if(${BUILDCC_PRECOMPILE_HEADERS})
6766
target_precompile_headers(buildcc_iINTERFACE buildcc.h)
68-
target_precompile_headers(buildcc_iINTERFACE${FBS_DIR}/pch/pch.h)
6967
endif()
7068
endif()
7169

‎buildcc/lib/args/test/test_register.cpp‎

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,9 @@ TEST(RegisterTestGroup, Register_Build) {
108108

109109
// Make dummy toolchain and target
110110
buildcc::Project::Init(fs::current_path(),fs::current_path());
111-
buildcc::Toolchaintoolchain(buildcc::ToolchainId::Gcc,"","","","","",
112-
"");
111+
buildcc::Toolchaintoolchain(
112+
buildcc::ToolchainId::Gcc,"",
113+
buildcc::ToolchainExecutables("","","","",""));
113114
buildcc::BaseTargettarget("dummyT", buildcc::TargetType::Executable,
114115
toolchain,"");
115116

@@ -160,8 +161,9 @@ TEST(RegisterTestGroup, Register_Run_PostCb) {
160161

161162
// Make dummy toolchain and target
162163
buildcc::Project::Init(fs::current_path(),fs::current_path());
163-
buildcc::Toolchaintoolchain(buildcc::ToolchainId::Gcc,"","","","","",
164-
"");
164+
buildcc::Toolchaintoolchain(
165+
buildcc::ToolchainId::Gcc,"",
166+
buildcc::ToolchainExecutables("","","","",""));
165167
buildcc::BaseTargettarget("dummyT", buildcc::TargetType::Executable,
166168
toolchain,"");
167169

@@ -203,8 +205,9 @@ TEST(RegisterTestGroup, Register_NoBuildAndDep) {
203205

204206
// Make dummy toolchain and target
205207
buildcc::Project::Init(fs::current_path(),fs::current_path());
206-
buildcc::Toolchaintoolchain(buildcc::ToolchainId::Gcc,"","","","","",
207-
"");
208+
buildcc::Toolchaintoolchain(
209+
buildcc::ToolchainId::Gcc,"",
210+
buildcc::ToolchainExecutables("","","","",""));
208211
buildcc::BaseTargettarget("dummyT", buildcc::TargetType::Executable,
209212
toolchain,"");
210213
buildcc::BaseTargetdependency("depT", buildcc::TargetType::Executable,
@@ -292,8 +295,9 @@ TEST(RegisterTestGroup, Register_BuildAndDep) {
292295

293296
// Make dummy toolchain and target
294297
buildcc::Project::Init(fs::current_path(),fs::current_path());
295-
buildcc::Toolchaintoolchain(buildcc::ToolchainId::Gcc,"","","","","",
296-
"");
298+
buildcc::Toolchaintoolchain(
299+
buildcc::ToolchainId::Gcc,"",
300+
buildcc::ToolchainExecutables("","","","",""));
297301
buildcc::BaseTargettarget("dummyT", buildcc::TargetType::Executable,
298302
toolchain,"");
299303
buildcc::BaseTargetdependency("depT", buildcc::TargetType::Executable,
@@ -389,8 +393,9 @@ TEST(RegisterTestGroup, Register_DepDuplicate) {
389393

390394
// Make dummy toolchain and target
391395
buildcc::Project::Init(fs::current_path(),fs::current_path());
392-
buildcc::Toolchaintoolchain(buildcc::ToolchainId::Gcc,"","","","","",
393-
"");
396+
buildcc::Toolchaintoolchain(
397+
buildcc::ToolchainId::Gcc,"",
398+
buildcc::ToolchainExecutables("","","","",""));
394399
buildcc::BaseTargettarget("dummyT", buildcc::TargetType::Executable,
395400
toolchain,"");
396401
buildcc::BaseTargetdependency("depT", buildcc::TargetType::Executable,
@@ -465,8 +470,9 @@ TEST(RegisterTestGroup, Register_DepCyclic) {
465470

466471
// Make dummy toolchain and target
467472
buildcc::Project::Init(fs::current_path(),fs::current_path());
468-
buildcc::Toolchaintoolchain(buildcc::ToolchainId::Gcc,"","","","","",
469-
"");
473+
buildcc::Toolchaintoolchain(
474+
buildcc::ToolchainId::Gcc,"",
475+
buildcc::ToolchainExecutables("","","","",""));
470476
buildcc::BaseTargettarget("dummyT", buildcc::TargetType::Executable,
471477
toolchain,"");
472478
buildcc::BaseTargetdependency("depT", buildcc::TargetType::Executable,
@@ -542,8 +548,9 @@ TEST(RegisterTestGroup, Register_Test) {
542548

543549
// Make dummy toolchain and target
544550
buildcc::Project::Init(fs::current_path(),fs::current_path());
545-
buildcc::Toolchaintoolchain(buildcc::ToolchainId::Gcc,"","","","","",
546-
"");
551+
buildcc::Toolchaintoolchain(
552+
buildcc::ToolchainId::Gcc,"",
553+
buildcc::ToolchainExecutables("","","","",""));
547554
buildcc::BaseTargettarget("dummyT", buildcc::TargetType::Executable,
548555
toolchain,"");
549556
buildcc::BaseTargetdependency("depT", buildcc::TargetType::Executable,
@@ -632,8 +639,9 @@ TEST(RegisterTestGroup, Register_TestWithOutput) {
632639

633640
// Make dummy toolchain and target
634641
buildcc::Project::Init(fs::current_path(),fs::current_path());
635-
buildcc::Toolchaintoolchain(buildcc::ToolchainId::Gcc,"","","","","",
636-
"");
642+
buildcc::Toolchaintoolchain(
643+
buildcc::ToolchainId::Gcc,"",
644+
buildcc::ToolchainExecutables("","","","",""));
637645
buildcc::BaseTargettarget("dummyT", buildcc::TargetType::Executable,
638646
toolchain,"");
639647
buildcc::BaseTargetdependency("depT", buildcc::TargetType::Executable,

‎buildcc/lib/env/CMakeLists.txt‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if (${TESTING})
1616
${CMAKE_CURRENT_SOURCE_DIR}/mock/include
1717
)
1818
target_link_libraries(mock_envPUBLIC
19-
fmt::fmt-header-only
19+
fmt::fmt
2020
Taskflow
2121

2222
CppUTest
@@ -96,11 +96,11 @@ if(${BUILDCC_BUILD_AS_INTERFACE})
9696
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
9797
$<INSTALL_INTERFACE:${BUILDCC_INSTALL_HEADER_PREFIX}>
9898
)
99-
target_link_libraries(envPUBLIC fmt::fmt-header-only)
99+
target_link_libraries(envPUBLIC fmt::fmt)
100100
target_compile_options(envPRIVATE${BUILD_COMPILE_FLAGS})
101101
target_link_options(envPRIVATE${BUILD_LINK_FLAGS})
102102
target_link_libraries(envPRIVATE
103-
spdlog::spdlog_header_only
103+
spdlog::spdlog
104104
tiny-process-library::tiny-process-library
105105
)
106106
endif()

‎buildcc/lib/env/include/env/storage.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ class ScopedStorage {
100100
* @param ptr Can hold data of any type
101101
* @param typeid_name We cannot store a template type so this is the next
102102
* best thing
103-
* @paramdesstructor Destructor callback to delete ptr
103+
* @paramdestructor Destructor callback to delete ptr
104104
*/
105105
structPtrMetadata {
106-
void *ptr;
106+
void *ptr{nullptr};
107107
std::string typeid_name;
108108
std::function<void(void)> destructor;
109109
};

‎buildcc/lib/target/test/target/test_base_target.cpp‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ TEST_GROUP(TargetBaseTestGroup)
2121
}
2222
};
2323
// clang-format on
24-
static buildcc::Toolchaingcc(buildcc::ToolchainId::Gcc,"gcc","as","gcc",
25-
"g++","ar","ld");
24+
static buildcc::Toolchaingcc(buildcc::ToolchainId::Gcc,"gcc",
25+
buildcc::ToolchainExecutables("as","gcc","g++",
26+
"ar","ld"));
2627

2728
TEST(TargetBaseTestGroup, InvalidTargetType) {
2829
constexprconstchar *const INVALID_NAME ="Invalid.random";

‎buildcc/lib/target/test/target/test_compile_object.cpp‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ TEST_GROUP(TargetCompileObjectTestGroup)
1515
};
1616
// clang-format on
1717

18-
static buildcc::Toolchaingcc(buildcc::ToolchainId::Gcc,"gcc","as","gcc",
19-
"g++","ar","ld");
18+
static buildcc::Toolchaingcc(buildcc::ToolchainId::Gcc,"gcc",
19+
buildcc::ToolchainExecutables("as","gcc","g++",
20+
"ar","ld"));
2021

2122
TEST(TargetCompileObjectTestGroup, CacheCompileCommand_Invalid) {
2223
buildcc::BaseTargettarget("CacheCompileCommand_Invalid",

‎buildcc/lib/target/test/target/test_target_external_lib.cpp‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ TEST_GROUP(TargetTestExternalLib)
2727
};
2828
// clang-format on
2929

30-
static buildcc::Toolchaingcc(buildcc::ToolchainId::Gcc,"gcc","as","gcc",
31-
"g++","ar","ld");
30+
static buildcc::Toolchaingcc(buildcc::ToolchainId::Gcc,"gcc",
31+
buildcc::ToolchainExecutables("as","gcc","g++",
32+
"ar","ld"));
3233

3334
staticconst fs::path intermediate_path =
3435
fs::path(BUILD_TARGET_EXTERNAL_LIB_INTERMEDIATE_DIR) / gcc.GetName();

‎buildcc/lib/target/test/target/test_target_failure_states.cpp‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ TEST_GROUP(TargetTestFailureStates)
2525
};
2626
// clang-format on
2727

28-
static buildcc::Toolchaingcc(buildcc::ToolchainId::Gcc,"gcc","as","gcc",
29-
"g++","ar","ld");
28+
static buildcc::Toolchaingcc(buildcc::ToolchainId::Gcc,"gcc",
29+
buildcc::ToolchainExecutables("as","gcc","g++",
30+
"ar","ld"));
3031

3132
TEST(TargetTestFailureStates, StartTaskEnvFailure) {
3233
buildcc::env::set_task_state(buildcc::env::TaskState::FAILURE);

‎buildcc/lib/target/test/target/test_target_flags.cpp‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121

2222
// Constants
2323

24-
static buildcc::Toolchaingcc(buildcc::ToolchainId::Gcc,"gcc","as","gcc",
25-
"g++","ar","ld");
24+
static buildcc::Toolchaingcc(buildcc::ToolchainId::Gcc,"gcc",
25+
buildcc::ToolchainExecutables("as","gcc","g++",
26+
"ar","ld"));
2627

2728
// ------------- PREPROCESSOR FLAGS ---------------
2829

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp