From 7d260287328a38fbc1430bed56cbdaeaebd58efd Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Fri, 2 Dec 2022 15:33:03 +0100 Subject: rules: Refactoring and minor improvements Compared to the previous commit, the action graphs for just and its unit tests are unchanged. - Git hash of action graph for ["",""]: c6e75f17abd7ffaab6ff9bb725ad67ec0bf6c973 - Git hash of action graph for ["test/buildtool","TESTS"]: 8063dfb3dd7daa9ae01d95c177e14946f785c57e Refactor: - "local cflags" to "private-cflags" - "local defines" to "private-defines" - "link externals" to "private-ldflags" - "deps" to "private-deps" for (test) binaries - "proto" to "private-proto" for binaries Improvements: - consistent variable declaration order: OS, ARCH, HOST_ARCH, TARGET_ARCH, CC, CXX, CFLAGS, CXXFLAGS, ADD_CFLAGS, ADD_CXXFLAGS, AR, ENV, PATH - use fields close to their definition (in RULES) - use common expression for binaries and test binaries - split expression "flags" and "compiler" ... to separate ones for CC and CXX. - rename "transition" to "deps-transition" ... to avoid conflicts with other transitions. - support "defaults-transition" for CC expressions Implement: - "cflags" for libraries - "private-cflags" for (test) binaries - "private-defines" for test binaries - "private-ldflags" for test binaries - (public) "defines" for libraries --- test/buildtool/multithreading/TARGETS | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/buildtool/multithreading') diff --git a/test/buildtool/multithreading/TARGETS b/test/buildtool/multithreading/TARGETS index 47267190..65f38330 100644 --- a/test/buildtool/multithreading/TARGETS +++ b/test/buildtool/multithreading/TARGETS @@ -2,7 +2,7 @@ { "type": ["@", "rules", "CC/test", "test"] , "name": ["task"] , "srcs": ["task.test.cpp"] - , "deps": + , "private-deps": [ ["@", "catch2", "", "catch2"] , ["test", "catch-main"] , ["src/buildtool/multithreading", "task_system"] @@ -13,7 +13,7 @@ { "type": ["@", "rules", "CC/test", "test"] , "name": ["task_system"] , "srcs": ["task_system.test.cpp"] - , "deps": + , "private-deps": [ ["@", "catch2", "", "catch2"] , ["test", "catch-main"] , ["test/utils", "container_matchers"] @@ -25,7 +25,7 @@ { "type": ["@", "rules", "CC/test", "test"] , "name": ["async_map_node"] , "srcs": ["async_map_node.test.cpp"] - , "deps": + , "private-deps": [ ["@", "catch2", "", "catch2"] , ["test", "catch-main"] , ["test/utils", "container_matchers"] @@ -38,7 +38,7 @@ { "type": ["@", "rules", "CC/test", "test"] , "name": ["async_map"] , "srcs": ["async_map.test.cpp"] - , "deps": + , "private-deps": [ ["@", "catch2", "", "catch2"] , ["test", "catch-main"] , ["test/utils", "container_matchers"] @@ -52,7 +52,7 @@ { "type": ["@", "rules", "CC/test", "test"] , "name": ["async_map_consumer"] , "srcs": ["async_map_consumer.test.cpp"] - , "deps": + , "private-deps": [ ["@", "catch2", "", "catch2"] , ["test", "catch-main"] , ["test/utils", "container_matchers"] -- cgit v1.2.3