Add file log support

This commit is contained in:
Adam Gu
2018-07-03 14:01:47 +08:00
parent 44271eb2cc
commit 7280b09f10
10 changed files with 96 additions and 40 deletions
-18
View File
@@ -68,24 +68,6 @@ if(WIN32)
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
endif()
# Group sources by dir.
# Usage: source_group_by_dir(SRCS)
macro(GROUP_SOURCES_BY_DIR source_files)
set(sgbd_cur_dir ${CMAKE_CURRENT_BINARY_DIR})
foreach(sgbd_file ${${source_files}})
#message("sgbd_fpath=${sgbd_fpath}")
string(REGEX REPLACE ${sgbd_cur_dir}/\(.*\) \\1 sgbd_fpath ${sgbd_file})
string(REGEX REPLACE "\(.*\)/.*" \\1 sgbd_group_name ${sgbd_fpath})
string(COMPARE EQUAL ${sgbd_fpath} ${sgbd_group_name} sgbd_nogroup)
string(REPLACE "/" "\\" sgbd_group_name ${sgbd_group_name})
if(sgbd_nogroup)
set(sgbd_group_name "\\")
endif()
#message("group name=${sgbd_group_name}")
source_group(${sgbd_group_name} FILES ${sgbd_file})
endforeach()
endmacro()
# C++ standard requirements.
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)