Skip to content

Commit

Permalink
Improve code style
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 committed Apr 13, 2024
1 parent 8bbe904 commit e36ead4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions 1k/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion 1k/dmcp/CMakeLists.txt → 1k/dm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
File renamed without changes.
2 changes: 1 addition & 1 deletion 1k/dmcp/dmcp.ps1 → 1k/dm/dm.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 -
Expand Down

0 comments on commit e36ead4

Please sign in to comment.