Skip to content

Commit b5dc8e7

Browse files
committed
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.
1 parent 8141d8f commit b5dc8e7

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ tmp
1515
t.*
1616
*.pid
1717
build
18+
Testing/Temporary/CTestCostData.txt
19+
Testing/Temporary/LastTest.log

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ option(CPPJIEBA_BUILD_TESTS "Build cppjieba tests" ${CPPJIEBA_TOP_LEVEL_PROJECT}
3131
if(CPPJIEBA_BUILD_TESTS)
3232
ENABLE_TESTING()
3333

34+
message(STATUS "MSVC value: ${MSVC}")
3435
ADD_SUBDIRECTORY(test)
3536
if(NOT MSVC)
3637
ADD_TEST(NAME ./test/test.run COMMAND ./test/test.run)

test/unittest/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
if (MSVC)
22
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDebugDLL")
33
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
4+
add_compile_options(/utf-8)
45
endif()
56

67
include(FetchContent)

0 commit comments

Comments
 (0)