From e36ead4e2e913eb7631c74dc3111ea2e01af9f08 Mon Sep 17 00:00:00 2001 From: halx99 Date: Sun, 14 Apr 2024 01:49:26 +0800 Subject: [PATCH] Improve code style --- 1k/build.ps1 | 6 +++--- 1k/{dmcp => dm}/CMakeLists.txt | 2 +- 1k/{dmcp/dummy.c => dm/dm.c} | 0 1k/{dmcp/dmcp.ps1 => dm/dm.ps1} | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename 1k/{dmcp => dm}/CMakeLists.txt (89%) rename 1k/{dmcp/dummy.c => dm/dm.c} (100%) rename 1k/{dmcp/dmcp.ps1 => dm/dm.ps1} (96%) diff --git a/1k/build.ps1 b/1k/build.ps1 index b8ff592..0941293 100644 --- a/1k/build.ps1 +++ b/1k/build.ps1 @@ -1757,9 +1757,9 @@ if (!$setupOnly) { if ($options.dm) { $b1k.println("Dumping compiler preprocessors ...") - $dmcp_dir = Join-Path $PSScriptRoot 'dmcp' - $dmcp_build_dir = Join-Path $dmcp_dir 'build' - &$config_cmd $CONFIG_ALL_OPTIONS -S $dmcp_dir -B $dmcp_build_dir | Out-Host ; Remove-Item $dmcp_build_dir -Recurse -Force + $dm_dir = Join-Path $PSScriptRoot 'dm' + $dm_build_dir = Join-Path $dm_dir 'build' + &$config_cmd $CONFIG_ALL_OPTIONS -S $dm_dir -B $dm_build_dir | Out-Host ; Remove-Item $dm_build_dir -Recurse -Force $b1k.println("Finish dump compiler preprocessors") } &$config_cmd $CONFIG_ALL_OPTIONS -B $BUILD_DIR | Out-Host diff --git a/1k/dmcp/CMakeLists.txt b/1k/dm/CMakeLists.txt similarity index 89% rename from 1k/dmcp/CMakeLists.txt rename to 1k/dm/CMakeLists.txt index 28f7c24..4a9fc69 100644 --- a/1k/dmcp/CMakeLists.txt +++ b/1k/dm/CMakeLists.txt @@ -9,5 +9,5 @@ message(STATUS "CMAKE_C_COMPILER=${CMAKE_C_COMPILER}") message(STATUS "CMAKE_C_FLAGS=${CMAKE_C_FLAGS}") if(NOT ${CMAKE_C_COMPILER} MATCHES ".*cl\.exe" OR "${MSVC_VERSION}" GREATER_EQUAL 1928) - execute_process(COMMAND ${PWSH_PROG} "${CMAKE_CURRENT_SOURCE_DIR}/dmcp.ps1" "${CMAKE_C_COMPILER}" "${CMAKE_C_FLAGS}") + execute_process(COMMAND ${PWSH_PROG} "${CMAKE_CURRENT_SOURCE_DIR}/dm.ps1" "${CMAKE_C_COMPILER}" "${CMAKE_C_FLAGS}") endif() diff --git a/1k/dmcp/dummy.c b/1k/dm/dm.c similarity index 100% rename from 1k/dmcp/dummy.c rename to 1k/dm/dm.c diff --git a/1k/dmcp/dmcp.ps1 b/1k/dm/dm.ps1 similarity index 96% rename from 1k/dmcp/dmcp.ps1 rename to 1k/dm/dm.ps1 index fb9677c..5c78ceb 100644 --- a/1k/dmcp/dmcp.ps1 +++ b/1k/dm/dm.ps1 @@ -10,7 +10,7 @@ if($cflags) { $cflags = $cflags.Split(' ') } if($cc.EndsWith('cl.exe')) { # vs2019+ support: - &$cc /EP /Zc:preprocessor /PD $cflags (Join-Path $PSScriptRoot 'dummy.c') + &$cc /EP /Zc:preprocessor /PD $cflags (Join-Path $PSScriptRoot 'dm.c') } else { Write-Host "dump command: <<$cc -E -dM $cflags ->>" echo ''| &$cc -E -dM $cflags -