chore: update build system

- use configuration-arch-based path in MSVC to make sure generated package can be used by native MSVC project.
- add github action and corresponding build script. but not tested.
- fix some testbench code.
This commit is contained in:
2024-06-20 15:47:15 +08:00
parent 3fa05b43d9
commit bb17bb6a1f
7 changed files with 93 additions and 12 deletions

View File

@ -33,11 +33,9 @@ PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:/utf-8>
)
# Install binary
# Install testbench only on Release mode
install(TARGETS YYCCTestbench
EXPORT YYCCTestbenchTargets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
CONFIGURATIONS Release
RUNTIME DESTINATION ${YYCC_INSTALL_PATH_BIN}
)

View File

@ -352,7 +352,9 @@ namespace YYCCTestbench {
static void WinFctTestbench() {
#if YYCC_OS == YYCC_OS_WINDOWS
Console::FormatLine("Current Module HANDLE: 0x%" PRI_XPTR_LEFT_PADDING PRIXPTR, YYCC::WinFctHelper::GetCurrentModule());
HMODULE test_current_module;
Assert((test_current_module = YYCC::WinFctHelper::GetCurrentModule()) != nullptr, "YYCC::WinFctHelper::GetCurrentModule");
Console::FormatLine("Current Module HANDLE: 0x%" PRI_XPTR_LEFT_PADDING PRIXPTR, test_current_module);
std::string test_temp;
Assert(YYCC::WinFctHelper::GetTempDirectory(test_temp), "YYCC::WinFctHelper::GetTempDirectory");