mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
build: update .gitignore and CMakeLists for test configuration
- Added entries to .gitignore for temporary test files. - Included a message to display MSVC value during build. - Added UTF-8 compile option for MSVC in unittest CMakeLists.
This commit is contained in:
parent
8141d8f434
commit
b5dc8e7a35
2
.gitignore
vendored
2
.gitignore
vendored
@ -15,3 +15,5 @@ tmp
|
|||||||
t.*
|
t.*
|
||||||
*.pid
|
*.pid
|
||||||
build
|
build
|
||||||
|
Testing/Temporary/CTestCostData.txt
|
||||||
|
Testing/Temporary/LastTest.log
|
||||||
|
@ -31,6 +31,7 @@ option(CPPJIEBA_BUILD_TESTS "Build cppjieba tests" ${CPPJIEBA_TOP_LEVEL_PROJECT}
|
|||||||
if(CPPJIEBA_BUILD_TESTS)
|
if(CPPJIEBA_BUILD_TESTS)
|
||||||
ENABLE_TESTING()
|
ENABLE_TESTING()
|
||||||
|
|
||||||
|
message(STATUS "MSVC value: ${MSVC}")
|
||||||
ADD_SUBDIRECTORY(test)
|
ADD_SUBDIRECTORY(test)
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
ADD_TEST(NAME ./test/test.run COMMAND ./test/test.run)
|
ADD_TEST(NAME ./test/test.run COMMAND ./test/test.run)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
if (MSVC)
|
if (MSVC)
|
||||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDebugDLL")
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDebugDLL")
|
||||||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||||
|
add_compile_options(/utf-8)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user