cleanup. Use G3Log instead of G2Log for binaries and configuration files

This commit is contained in:
KjellKod 2014-10-03 01:53:21 -06:00
parent c99b1089c2
commit 0e37df7162
4 changed files with 41 additions and 41 deletions

View File

@ -42,7 +42,7 @@ ELSEIF(MSVC)
MESSAGE("")
MESSAGE("Windows: Please run the command [cmake -DCMAKE_BUILD_TYPE=Release -G \"Visual Studio 11\" ..]")
MESSAGE("if cmake finishes OK, do 'msbuild g3log.sln /p:Configuration=Release'")
MESSAGE("then run 'Release\\g2log-FATAL-*' examples")
MESSAGE("then run 'Release\\g3log-FATAL-*' examples")
MESSAGE("")
ENDIF()
@ -52,7 +52,7 @@ ENDIF()
# GENERIC STEPS
file(GLOB SRC_FILES ${LOG_SRC}/*.h ${LOG_SRC}/*.hpp ${LOG_SRC}/*.cpp ${LOG_SRC}/*.ipp)
file(GLOB HEADER_FILES ${LOG_SRC}/*.h ${LOG_SRC}/*.hpp)
MESSAGE(" HEADER FILES ARE: ${HEADER_FILES}")
#MESSAGE(" HEADER FILES ARE: ${HEADER_FILES}")
IF (MSVC OR MINGW)
list(REMOVE_ITEM SRC_FILES ${LOG_SRC}/crashhandler_unix.cpp)
@ -62,9 +62,9 @@ ENDIF()
set(SRC_FILES ${SRC_FILES} ${SRC_PLATFORM_SPECIFIC})
# Create the g2log library
# Create the g3log library
include_directories(${LOG_SRC})
MESSAGE(" g3logger files: [${SRC_FILES}]")
#MESSAGE(" g3logger files: [${SRC_FILES}]")
add_library(g3logger ${SRC_FILES})
set_target_properties(g3logger PROPERTIES LINKER_LANGUAGE CXX)
add_library(g3logger_shared SHARED ${SRC_FILES})

View File

@ -1,5 +1,4 @@
# CMakeLists.txt cmake configuration for g2log test
# g2log is a KjellKod Logger
# g3log is a KjellKod Logger
# 2011 @author Kjell Hedström, hedstrom@kjellkod.cc
# ==================================================================
# 2010 by KjellKod.cc. This is PUBLIC DOMAIN to use at your own
@ -20,25 +19,26 @@
# 2. from the g3log folder
# mkdir build
# cd build;
# 3. cmake -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 12" ..
# 3. cmake -DCMAKE_BUILD_TYPE=Release -G "Visual Studio XXX" ..
# (XXX is the Visual Studio version you are running)
# 4. msbuild g3log.sln /p:Configuration=Release
#
# Try to run an example, such as:
# 5. Release\g2log-FATAL-contract.exe
# 5. Release\g3log-FATAL-contract.exe
#
#
# === LINUX: === To try this out from folder g2log:
# === LINUX: === To try this out from folder g3log:
# mkdir build
# cd build
# >> create makefiles in g2log/build directory
# >> create makefiles in g3log/build directory
# cmake -DCMAKE_BUILD_TYPE=Release ..
# make -jN (where N stands for number of cores you want to utilize)
#
#
#
# === Clang on Linux ===
# From g2log/g2log
# From g3log
# mkdir build && cd build
# cmake -DCMAKE_CXX_COMPILER=clang++ ..
# if you want to double-check settings: "VERBOSE=1 make"
@ -94,7 +94,7 @@ endif()
# ============================================================================
# PERFORMANCE TEST OPTIONS: Performance operations for g3log
# ============================================================================
# ENABLE WITH: -USE_G2LOG_PERFORMANCE=ON
# ENABLE WITH: -USE_G3LOG_PERFORMANCE=ON
INCLUDE (${g3log_SOURCE_DIR}/test_performance/Performance.cmake)
@ -119,7 +119,7 @@ endif()
#
# Check the output result and install accordingly.
# ==========================================================================
INCLUDE (${g3log_SOURCE_DIR}/CPackLists.txt)
# INCLUDE (${g3log_SOURCE_DIR}/CPackLists.txt)

View File

@ -1,40 +1,40 @@
# 2. performance test (average + worst case) for KjellKod's g2log
# Do 'cmake -DUSE_G2LOG_PERFORMANCE=ON' to enable this
option (USE_G2LOG_PERFORMANCE "g2log performance test" OFF)
# 2. performance test (average + worst case) for KjellKod's g3log
# Do 'cmake -DUSE_G3LOG_PERFORMANCE=ON' to enable this
option (USE_G3LOG_PERFORMANCE "g3log performance test" OFF)
# 2. create the g2log's performance tests
# 2. create the g3log's performance tests
# =========================
IF (USE_G2LOG_PERFORMANCE)
IF (USE_G3LOG_PERFORMANCE)
set(DIR_PERFORMANCE ${g3log_SOURCE_DIR}/test_performance)
MESSAGE("-DUSE_G2LOG_PERFORMANCE=ON")
MESSAGE("-DUSE_G3LOG_PERFORMANCE=ON")
include_directories (${DIR_PERFORMANCE})
# MEAN PERFORMANCE TEST
add_executable(g2log-performance-threaded_mean
add_executable(g3log-performance-threaded_mean
${DIR_PERFORMANCE}/main_threaded_mean.cpp
${DIR_PERFORMANCE}/performance.h)
# Turn on G2LOG performance flag
set_target_properties(g2log-performance-threaded_mean PROPERTIES
# Turn on G3LOG performance flag
set_target_properties(g3log-performance-threaded_mean PROPERTIES
COMPILE_DEFINITIONS "G2LOG_PERFORMANCE=1")
target_link_libraries(g2log-performance-threaded_mean
target_link_libraries(g3log-performance-threaded_mean
${G3LOG_LIBRARY} ${PLATFORM_LINK_LIBRIES})
# WORST CASE PERFORMANCE TEST
add_executable(g2log-performance-threaded_worst
add_executable(g3log-performance-threaded_worst
${DIR_PERFORMANCE}/main_threaded_worst.cpp ${DIR_PERFORMANCE}/performance.h)
# Turn on G2LOG performance flag
set_target_properties(g2log-performance-threaded_worst PROPERTIES
# Turn on G3LOG performance flag
set_target_properties(g3log-performance-threaded_worst PROPERTIES
COMPILE_DEFINITIONS "G2LOG_PERFORMANCE=1")
target_link_libraries(g2log-performance-threaded_worst
target_link_libraries(g3log-performance-threaded_worst
${G3LOG_LIBRARY} ${PLATFORM_LINK_LIBRIES})
ELSE()
MESSAGE("-DUSE_G2LOG_PERFORMANCE=OFF")
ENDIF(USE_G2LOG_PERFORMANCE)
MESSAGE("-DUSE_G3LOG_PERFORMANCE=OFF")
ENDIF(USE_G3LOG_PERFORMANCE)

View File

@ -1,33 +1,33 @@
# -DUSE_G2LOG_UNIT_TEST=ON : unit tests
# -DUSE_G3LOG_UNIT_TEST=ON : unit tests
#
#
option (USE_G2LOG_UNIT_TEST
option (USE_G3LOG_UNIT_TEST
"Turn ON/OFF unit tests for G3Log" OFF)
# ============================================================================
# TEST OPTIONS: Turn OFF the ones that is of no interest to you
# ---- by default all is OFF: except 'g2log-FATAL-example -----
# ---- by default all is OFF: except 'g3log-FATAL-example -----
# ---- the reason for this is that
# ----- 1) the performance tests were only thoroughly tested on Ubuntu, not windows-
# (g2log windows/linux, but Google's glog only on linux)
# (g3log windows/linux, but Google's glog only on linux)
#
# 2) The unit test were tested windows/linux,. but must be unzipped
# before it can be "cmake'd" and compiled --- leaving it as OFF for now
# ============================================================================
# Unit test for g2log (cmake -DUSE_G2LOG_UNIT_TEST=ON ..)
# remember to unzip gtest at g2log/3rdParty/gtest
option (USE_G2LOG_UNIT_TEST "g2log unit tests" OFF)
# Unit test for g3log (cmake -DUSE_G3LOG_UNIT_TEST=ON ..)
# remember to unzip gtest at g3log/3rdParty/gtest
option (USE_G3LOG_UNIT_TEST "g3log unit tests" OFF)
# 4. create the unit tests for g2log --- ONLY TESTED THE UNIT TEST ON LINUX
# 4. create the unit tests for g3log --- ONLY TESTED THE UNIT TEST ON LINUX
# =========================
IF (USE_G2LOG_UNIT_TEST)
IF (USE_G3LOG_UNIT_TEST)
set(DIR_UNIT_TEST ${g3log_SOURCE_DIR}/test_unit)
MESSAGE("-DUSE_G2LOG_UNIT_TEST=ON")
MESSAGE("-DUSE_G3LOG_UNIT_TEST=ON")
set(GTEST_DIR ${g3log_SOURCE_DIR}/3rdParty/gtest/gtest-1.7.0)
set(GTEST_INCLUDE_DIRECTORIES ${GTEST_DIR}/include ${GTEST_DIR} ${GTEST_DIR}/src)
include_directories(${GTEST_INCLUDE_DIRECTORIES})
@ -72,5 +72,5 @@ option (USE_G2LOG_UNIT_TEST
target_link_libraries(test_dynamic_loaded_shared_lib ${G3LOG_SHARED_LIBRARY} -ldl gtest_170_lib )
ENDIF()
ELSE()
MESSAGE("-DUSE_G2LOG_UNIT_TEST=OFF")
ENDIF (USE_G2LOG_UNIT_TEST)
MESSAGE("-DUSE_G3LOG_UNIT_TEST=OFF")
ENDIF (USE_G3LOG_UNIT_TEST)