Implement USE_UTF8_INSTEAD_OF_CODECVT macro in CMakeLists.txt in another way.

This commit is contained in:
Charles Ruan 2020-09-12 21:29:00 +08:00
parent 73f157fb91
commit ae0c7a31f8
1 changed files with 3 additions and 3 deletions

View File

@ -71,6 +71,9 @@ else()
set(MY_CXX_WARNING_FLAGS " -Wall -pedantic -W")
endif()
# Define USE_UTF8_INSTEAD_OF_CODECVT macro.
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_UTF8_INSTEAD_OF_CODECVT")
# Initialize CXXFLAGS.
if("${CMAKE_VERSION}" VERSION_GREATER 3.1.0)
set(CMAKE_CXX_STANDARD 11)
@ -83,9 +86,6 @@ else()
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -std=c++11")
endif()
# Define USE_UTF8_INSTEAD_OF_CODECVT macro.
# add_compile_definitions(USE_UTF8_INSTEAD_OF_CODECVT)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MY_CXX_WARNING_FLAGS}")
if(MSVC_VERSION)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MP ${MY_CXX_WARNING_FLAGS}")