diff options
-rw-r--r-- | CMakeLists.txt | 7 | ||||
-rw-r--r-- | test/CMakeLists.txt | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2307e55..8adbdb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,11 @@ option(ENABLE_EXTERNAL_KEYBOARDS ON ) +option(ENABLE_UNIT_TEST + "Enable/Disable unit test." + ON +) + include(CTest) include(GNUInstallDirs) @@ -48,7 +53,7 @@ add_subdirectory(tools) add_subdirectory(po) if(BUILD_TESTING) - add_subdirectory(test) + add_subdirectory(test EXCLUDE_FROM_ALL) endif() include(CMakePackageConfigHelpers) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6e21f2f..a82e4d4 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -36,6 +36,8 @@ target_compile_definitions(test-hanja PRIVATE target_link_libraries(test-hanja LINK_PRIVATE hangul) # unit test +if(ENABLE_UNIT_TEST) + pkg_check_modules(CHECK REQUIRED check) add_executable(unittest @@ -52,3 +54,5 @@ target_link_libraries(unittest PRIVATE hangul ${CHECK_LDFLAGS}) add_test(NAME unittest COMMAND ./unittest ) + +endif() # ENABLE_UNIT_TEST) |