Skip to content

Commit

Permalink
Merge pull request sakura-editor#422 from m-tmatma/add-include-sakura…
Browse files Browse the repository at this point in the history
…-to-unittest

単体テストのプロジェクト設定で sakura editor 本体のソースコードのインクルードディレクトリの指定を追加する
  • Loading branch information
beru committed Sep 9, 2018
2 parents e5f43a9 + 30a6a78 commit 7de7107
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/unittests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ file(GLOB SRC ${CMAKE_CURRENT_LIST_DIR}/test*.cpp)
# add include directories
include_directories(${googletest_SOURCE_DIR}/include)

# add include directories for sakura_core
include_directories(${CMAKE_SOURCE_DIR}/../sakura_core)

# define sources files of an executable
add_executable(${project_name} ${SRC})

Expand Down
6 changes: 6 additions & 0 deletions unittest.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- [一覧](#一覧)
- [呼び出し構造](#呼び出し構造)
- [使用するバッチファイルの引数](#使用するバッチファイルの引数)
- [インクルードディレクトリ](#インクルードディレクトリ)

<!-- /TOC -->

Expand Down Expand Up @@ -72,3 +73,8 @@ GUI でステップ実行することができます。
|[tests\build-project.bat](tests/build-project.bat) | platform ("Win32" または "x64") | configuration ("Debug" または "Release") |
|[tests\run-tests.bat](tests/run-tests.bat) | platform ("Win32" または "x64") | configuration ("Debug" または "Release") |
|[tests\build-and-test.bat](tests/build-and-test.bat)| platform ("Win32" または "x64") | configuration ("Debug" または "Release") |

## インクルードディレクトリ

[単体テスト用のCMakeLists.txt](tests/unittests/CMakeLists.txt)[サクラエディタ用のディレクトリ](sakura_core)
インクルードディレクトリを指定するので、そこからの相対パスを指定すれば、サクラエディタのヘッダをインクルードできます。

0 comments on commit 7de7107

Please sign in to comment.