From be2184d36d4492e43fbed1f6581fa26636d803ac Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 3 Feb 2026 21:54:09 +0100 Subject: Remove ctor::flags construct and apply tool specific flags (ie. ctor::cxx_flags, ...) directly in build config. Loosen generator requirements, to allow for lambda's directly. --- test/ctor.cc | 148 +++++++++++++++++++++++++---------------------------------- 1 file changed, 62 insertions(+), 86 deletions(-) (limited to 'test/ctor.cc') diff --git a/test/ctor.cc b/test/ctor.cc index 440ddfe..afec91c 100644 --- a/test/ctor.cc +++ b/test/ctor.cc @@ -17,13 +17,11 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings) "argparser_test.cc", "testmain.cc", }, - ctor::flags{ - ctor::cxx_flags{ - "-std=c++20", "-O3", "-Wall", - "-I../src", "-Iuunit", - "-DOUTPUT=\"argparser\"", - "-fexceptions", - }, + ctor::cxx_flags{ + "-std=c++20", "-O3", "-Wall", + "-I../src", "-Iuunit", + "-DOUTPUT=\"argparser\"", + "-fexceptions", }, }, { @@ -35,13 +33,11 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings) "testmain.cc", }, ctor::depends({"libctor_nomain.a"}), - ctor::flags{ - ctor::cxx_flags{ - "-std=c++20", "-O3", "-Wall", - "-I../src", "-Iuunit", - "-DOUTPUT=\"generated_sources\"", - "-fexceptions", - }, + ctor::cxx_flags{ + "-std=c++20", "-O3", "-Wall", + "-I../src", "-Iuunit", + "-DOUTPUT=\"generated_sources\"", + "-fexceptions", }, }, { @@ -53,13 +49,11 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings) "testmain.cc", "../src/util.cc", }, - ctor::flags{ - ctor::cxx_flags{ - "-std=c++20", "-O3", "-Wall", - "-I../src", "-Iuunit", - "-DOUTPUT=\"argsplit\"", - "-fexceptions", - }, + ctor::cxx_flags{ + "-std=c++20", "-O3", "-Wall", + "-I../src", "-Iuunit", + "-DOUTPUT=\"argsplit\"", + "-fexceptions", }, }, { @@ -71,13 +65,11 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings) "testmain.cc", "../src/pointerlist.cc", }, - ctor::flags{ - ctor::cxx_flags{ - "-std=c++20", "-O3", "-Wall", - "-I../src", "-Iuunit", - "-DOUTPUT=\"pointerlist\"", - "-fexceptions", - }, + ctor::cxx_flags{ + "-std=c++20", "-O3", "-Wall", + "-I../src", "-Iuunit", + "-DOUTPUT=\"pointerlist\"", + "-fexceptions", }, }, { @@ -91,13 +83,11 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings) "../src/util.cc", }, ctor::depends({"testprog"}), - ctor::flags{ - ctor::cxx_flags{ - "-std=c++20", "-O3", "-Wall", - "-I../src", "-Iuunit", - "-DOUTPUT=\"deps\"", - "-fexceptions", - }, + ctor::cxx_flags{ + "-std=c++20", "-O3", "-Wall", + "-I../src", "-Iuunit", + "-DOUTPUT=\"deps\"", + "-fexceptions", }, }, { @@ -107,11 +97,9 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings) ctor::sources{ "testprog.cc", }, - ctor::flags{ - ctor::cxx_flags{ - "-std=c++20", "-O3", "-Wall", - "-fexceptions", - }, + ctor::cxx_flags{ + "-std=c++20", "-O3", "-Wall", + "-fexceptions", }, }, { @@ -126,15 +114,13 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings) "../src/util.cc", }, ctor::depends({"testprog"}), - ctor::flags{ - ctor::cxx_flags{ - "-std=c++20", "-O3", "-Wall", - "-I../src", "-Iuunit", - "-DOUTPUT=\"execute\"", - "-fexceptions", - }, - ctor::ld_flags{ "-pthread" }, + ctor::cxx_flags{ + "-std=c++20", "-O3", "-Wall", + "-I../src", "-Iuunit", + "-DOUTPUT=\"execute\"", + "-fexceptions", }, + ctor::ld_flags{ "-pthread" }, }, { ctor::target_type::unit_test, @@ -145,15 +131,13 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings) "testmain.cc", }, ctor::depends({"libctor_nomain.a"}), - ctor::flags{ - ctor::cxx_flags{ - "-std=c++20", "-O3", "-Wall", - "-I../src", "-Iuunit", - "-DOUTPUT=\"tasks\"", - "-fexceptions", - }, - ctor::ld_flags{ "-pthread" }, + ctor::cxx_flags{ + "-std=c++20", "-O3", "-Wall", + "-I../src", "-Iuunit", + "-DOUTPUT=\"tasks\"", + "-fexceptions", }, + ctor::ld_flags{ "-pthread" }, }, { ctor::target_type::unit_test, @@ -164,15 +148,13 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings) "testmain.cc", }, ctor::depends({"libctor_nomain.a"}), - ctor::flags{ - ctor::cxx_flags{ - "-std=c++20", "-O3", "-Wall", - "-I../src", "-Iuunit", - "-DOUTPUT=\"cycle\"", - "-fexceptions", - }, - ctor::ld_flags{ "-pthread" }, + ctor::cxx_flags{ + "-std=c++20", "-O3", "-Wall", + "-I../src", "-Iuunit", + "-DOUTPUT=\"cycle\"", + "-fexceptions", }, + ctor::ld_flags{ "-pthread" }, }, { ctor::target_type::unit_test, @@ -183,15 +165,13 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings) "testmain.cc", }, ctor::depends({"libctor_nomain.a"}), - ctor::flags{ - ctor::cxx_flags{ - "-std=c++20", "-O3", "-Wall", - "-I../src", "-Iuunit", - "-DOUTPUT=\"source_type\"", - "-fexceptions", - }, - ctor::ld_flags{ "-pthread" }, + ctor::cxx_flags{ + "-std=c++20", "-O3", "-Wall", + "-I../src", "-Iuunit", + "-DOUTPUT=\"source_type\"", + "-fexceptions", }, + ctor::ld_flags{ "-pthread" }, }, { ctor::target_type::unit_test, @@ -204,13 +184,11 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings) "../src/tools.cc", }, ctor::depends({"libctor_nomain.a"}), - ctor::flags{ - ctor::cxx_flags{ - "-std=c++20", "-O3", "-Wall", - "-I../src", "-Iuunit", - "-DOUTPUT=\"tools\"", - "-fexceptions", - }, + ctor::cxx_flags{ + "-std=c++20", "-O3", "-Wall", + "-I../src", "-Iuunit", + "-DOUTPUT=\"tools\"", + "-fexceptions", }, }, { @@ -236,14 +214,12 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings) "../src/externals_manual.cc", "../configuration.cc", }, - ctor::flags{ - ctor::cxx_flags{ - "-std=c++20", "-O3", "-Wall", - "-I../src", - "-fexceptions", - }, - ctor::ld_flags{ "-pthread" }, + ctor::cxx_flags{ + "-std=c++20", "-O3", "-Wall", + "-I../src", + "-fexceptions", }, + ctor::ld_flags{ "-pthread" }, }, }; } -- cgit v1.2.3