Skip to content

Commit

Permalink
build: specify /execution-charset:shift_jis option to MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
kg68k committed Nov 30, 2024
1 parent cb3806b commit aaee2ee
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ add_executable(${PROJECT_NAME})
target_compile_features(${PROJECT_NAME} PRIVATE $<IF:$<BOOL:${MSVC}>,c_std_17,c_std_23>)

if(MSVC)
target_compile_options(${PROJECT_NAME} PRIVATE /source-charset:utf-8 /J)
target_compile_options(${PROJECT_NAME} PRIVATE /source-charset:utf-8 /execution-charset:shift_jis)
target_compile_options(${PROJECT_NAME} PRIVATE /d1trimfile:${CMAKE_CURRENT_SOURCE_DIR}\\)
target_compile_options(${PROJECT_NAME} PRIVATE /J)
else()
target_compile_options(${PROJECT_NAME} PRIVATE -funsigned-char -O3 -Wall -Wextra -Werror -pipe)
endif()
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
X680x0/Human68k 用の高機能逆アセンブラです。


## Build
## Build on X680x0
PCやネット上での取り扱いを用意にするために、src/内のファイルはUTF-8で記述されています。
X680x0上でビルドする際には、UTF-8からShift_JISへの変換が必要です。

Expand Down
16 changes: 11 additions & 5 deletions docs/ports.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@ CMake でプロジェクトが構築されるのでそのままビルドして

ただしそのままだとデバッグビルドになるので、リリースビルドを行う場合は下記手順で設定します。

1. 「プロジェクト」メニュー → dis の CMake の設定
(または構成リストボックスの「構成を管理します...」)
2. 新規構成の追加 → 「x64-Release」を選択
3. 構成の種類を「Release」に変更して保存
4. 構成リストボックスで「x64-Release」を選択
1. 「プロジェクト」メニュー → dis の CMake の設定を開きます
(または構成リストボックスの「構成を管理します...」)。
2. 新規構成の追加 → 「x64-Release」を選択します。
3. 構成の種類を「Release」(または「MinSizeRel」)に変更して保存します。
4. 構成リストボックスで「x64-Release」を選択します。

なお、スタートメニューの Developer Command Prompt for VS 2022 でコマンドプロンプトを開き、
Linux と同様の手順で CMake によるビルドを行うこともできます。
* git が使えない場合は代わりに手動でリポジトリのダウンロード、展開をします。
* リリースビルドの場合は `cmake --build build --config Release`
(または `--config MinSizeRel`)とします。

## 未確認環境

Expand Down

0 comments on commit aaee2ee

Please sign in to comment.