summaryrefslogtreecommitdiff
path: root/test/ctor.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2024-12-07 17:14:45 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2024-12-21 16:21:49 +0100
commitd2e7188e33a58cab05ef6292795303ad4b92a5f7 (patch)
treea6789fb724833d4d800626bf9b4707fa4ae1e9d8 /test/ctor.cc
parente166206702c8dbd3162452cf26f368e856ac0138 (diff)
WIPmsvc
Diffstat (limited to 'test/ctor.cc')
-rw-r--r--test/ctor.cc47
1 files changed, 37 insertions, 10 deletions
diff --git a/test/ctor.cc b/test/ctor.cc
index ccf1c31..56218f9 100644
--- a/test/ctor.cc
+++ b/test/ctor.cc
@@ -10,15 +10,17 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings)
return
{
{
+ .name = "testprog",
.type = ctor::target_type::unit_test,
.system = ctor::output_system::build,
.target = "testprog",
.sources = {
- "testprog.cc",
+ {"testprog.cc"},
},
.flags = {
.cxxflags = {
- "-std=c++20", "-O3", "-Wall", "-Werror",
+ "-std=c++20", "-O3", "-Wall",// "-Werror",
+ {ctor::toolchain::msvc, ctor::cxx_opt::custom, "/EHsc"},
},
},
},
@@ -35,9 +37,10 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings)
.depends = { "testprog", },
.flags = {
.cxxflags = {
- "-std=c++20", "-O3", "-Wall", "-Werror",
+ "-std=c++20", "-O3", "-Wall",// "-Werror",
"-I../src", "-Iuunit",
"-DOUTPUT=\"execute\"",
+ {ctor::toolchain::msvc, ctor::cxx_opt::custom, "/EHsc"},
},
.ldflags = { "-pthread" },
},
@@ -50,12 +53,13 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings)
"tasks_test.cc",
"testmain.cc",
},
- .depends = { "libctor_nomain.a" },
+ .depends = { "libctor_nomain.lib" },
.flags = {
.cxxflags = {
- "-std=c++20", "-O3", "-Wall", "-Werror",
+ "-std=c++20", "-O3", "-Wall",// "-Werror",
"-I../src", "-Iuunit",
"-DOUTPUT=\"tasks\"",
+ {ctor::toolchain::msvc, ctor::cxx_opt::custom, "/EHsc"},
},
.ldflags = { "-pthread" },
},
@@ -68,12 +72,13 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings)
"source_type_test.cc",
"testmain.cc",
},
- .depends = { "libctor_nomain.a" },
+ .depends = { "libctor_nomain.lib" },
.flags = {
.cxxflags = {
- "-std=c++20", "-O3", "-Wall", "-Werror",
+ "-std=c++20", "-O3", "-Wall",// "-Werror",
"-I../src", "-Iuunit",
"-DOUTPUT=\"source_type\"",
+ {ctor::toolchain::msvc, ctor::cxx_opt::custom, "/EHsc"},
},
.ldflags = { "-pthread" },
},
@@ -91,16 +96,17 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings)
//.depends = { "libctor_nomain.a" },
.flags = {
.cxxflags = {
- "-std=c++20", "-O3", "-Wall", "-Werror",
+ "-std=c++20", "-O3", "-Wall",// "-Werror",
"-I../src", "-Iuunit",
"-DOUTPUT=\"tools\"",
+ {ctor::toolchain::msvc, ctor::cxx_opt::custom, "/EHsc"},
},
},
},
{
.type = ctor::target_type::unit_test_library,
.system = ctor::output_system::build,
- .target = "libctor_nomain.a",
+ .target = "libctor_nomain.lib",
.sources = {
"../src/build.cc",
"../src/configure.cc",
@@ -116,11 +122,32 @@ ctor::build_configurations ctorTestConfigs(const ctor::settings& settings)
"../src/tools.cc",
"../src/util.cc",
"../src/externals_manual.cc",
+ {ctor::toolchain::msvc, "../getopt-for-windows/getopt.c"},
},
.flags = {
+ .cflags = {
+ "-O3",
+// "-g",
+// "-Wall",
+// "-Wconversion",
+// "-Wextra",
+ //"-Werror",
+ "-I../src",
+ {ctor::toolchain::msvc, ctor::c_opt::custom, "/I../getopt-for-windows"},
+ {ctor::toolchain::msvc, ctor::c_opt::custom, "/D_X86_"},
+ {ctor::toolchain::msvc, ctor::c_opt::custom, "/EHsc"},
+ {ctor::toolchain::msvc, ctor::c_opt::custom, "/external:W0"},
+ {ctor::toolchain::msvc, ctor::c_opt::custom, "/D_CRT_SECURE_NO_WARNINGS"},
+ },
.cxxflags = {
- "-std=c++20", "-O3", "-Wall", "-Werror",
+ "-std=c++20", "-O3", "-Wall",// "-Werror",
"-I../src",
+ {ctor::toolchain::msvc, ctor::cxx_opt::custom, "/Igetopt-for-windows"},
+ {ctor::toolchain::msvc, ctor::cxx_opt::custom, "/D_X86_"},
+ {ctor::toolchain::msvc, ctor::cxx_opt::custom, "/EHsc"},
+ {ctor::toolchain::msvc, ctor::cxx_opt::custom, "/external:W0"},
+ {ctor::toolchain::msvc, ctor::cxx_opt::custom, "/D_CRT_SECURE_NO_WARNINGS"},
+ {ctor::toolchain::msvc, ctor::cxx_opt::custom, "/Dstrdup=_strdup"},
},
.ldflags = { "-pthread" },
},