g3log/CMakeLists.txt
KjellKod 87a095e384 Renamed directories for a cleaner project structure
--HG--
rename : g2log/Build.cmake => Build.cmake
rename : g2log/CMakeLists.txt => CMakeLists.txt
rename : g2log/CPackLists.txt => CPackLists.txt
rename : g2log/Dynamic.cmake => Dynamic.cmake
rename : g2log/example/Example.cmake => example/Example.cmake
rename : g2log/example/main_contract.cpp => example/main_contract.cpp
rename : g2log/example/main_sigsegv.cpp => example/main_sigsegv.cpp
rename : g2log/src/active.hpp => src/active.hpp
rename : g2log/src/crashhandler.hpp => src/crashhandler.hpp
rename : g2log/src/crashhandler_unix.cpp => src/crashhandler_unix.cpp
rename : g2log/src/crashhandler_win.cpp => src/crashhandler_win.cpp
rename : g2log/src/g2filesink.cpp => src/g2filesink.cpp
rename : g2log/src/g2filesink.hpp => src/g2filesink.hpp
rename : g2log/src/g2filesinkhelper.ipp => src/g2filesinkhelper.ipp
rename : g2log/src/g2future.hpp => src/g2future.hpp
rename : g2log/src/g2log.cpp => src/g2log.cpp
rename : g2log/src/g2log.hpp => src/g2log.hpp
rename : g2log/src/g2loglevels.cpp => src/g2loglevels.cpp
rename : g2log/src/g2loglevels.hpp => src/g2loglevels.hpp
rename : g2log/src/g2logmessage.cpp => src/g2logmessage.cpp
rename : g2log/src/g2logmessage.hpp => src/g2logmessage.hpp
rename : g2log/src/g2logmessagecapture.cpp => src/g2logmessagecapture.cpp
rename : g2log/src/g2logmessagecapture.hpp => src/g2logmessagecapture.hpp
rename : g2log/src/g2logworker.cpp => src/g2logworker.cpp
rename : g2log/src/g2logworker.hpp => src/g2logworker.hpp
rename : g2log/src/g2moveoncopy.hpp => src/g2moveoncopy.hpp
rename : g2log/src/g2sink.hpp => src/g2sink.hpp
rename : g2log/src/g2sinkhandle.hpp => src/g2sinkhandle.hpp
rename : g2log/src/g2sinkwrapper.hpp => src/g2sinkwrapper.hpp
rename : g2log/src/g2time.cpp => src/g2time.cpp
rename : g2log/src/g2time.hpp => src/g2time.hpp
rename : g2log/src/shared_queue.hpp => src/shared_queue.hpp
rename : g2log/src/std2_make_unique.hpp => src/std2_make_unique.hpp
rename : g2log/src/stlpatch_future.hpp => src/stlpatch_future.hpp
rename : g2log/test_performance/Performance.cmake => test_performance/Performance.cmake
rename : g2log/test_performance/main_threaded_mean.cpp => test_performance/main_threaded_mean.cpp
rename : g2log/test_performance/main_threaded_worst.cpp => test_performance/main_threaded_worst.cpp
rename : g2log/test_performance/performance.h => test_performance/performance.h
rename : g2log/test_unit/Test.cmake => test_unit/Test.cmake
rename : g2log/test_unit/test_concept_sink.cpp => test_unit/test_concept_sink.cpp
rename : g2log/test_unit/test_configuration.cpp => test_unit/test_configuration.cpp
rename : g2log/test_unit/test_filechange.cpp => test_unit/test_filechange.cpp
rename : g2log/test_unit/test_io.cpp => test_unit/test_io.cpp
rename : g2log/test_unit/test_linux_dynamic_loaded_sharedlib.cpp => test_unit/test_linux_dynamic_loaded_sharedlib.cpp
rename : g2log/test_unit/test_sink.cpp => test_unit/test_sink.cpp
rename : g2log/test_unit/tester_sharedlib.cpp => test_unit/tester_sharedlib.cpp
rename : g2log/test_unit/tester_sharedlib.h => test_unit/tester_sharedlib.h
rename : g2log/test_unit/testing_helpers.cpp => test_unit/testing_helpers.cpp
rename : g2log/test_unit/testing_helpers.h => test_unit/testing_helpers.h
2014-10-03 01:20:33 -06:00

129 lines
4.0 KiB
CMake

# CMakeLists.txt cmake configuration for g2log test
# g2log 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
# risk and comes with no warranties.
#
# This code is yours to share, use and modify with no strings attached
# and no restrictions or obligations.
# ===================================================================
# Below are details for compiling on Windows and Linux
# by default only an example g3log binary is created
# the performance and unit tests creation can be enabled by switching their
# OPTIONs from OFF to ON --- See below at around line 110
# === WINDOWS ===
# Example for: Visual Studio 2013 (earlier should work too)
# 1. please use the "Visual Studio Command Prompt 12 (2013)"
# 2. from the g3log folder
# mkdir build
# cd build;
# 3. cmake -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 12" ..
# 4. msbuild g3log.sln /p:Configuration=Release
#
# Try to run an example, such as:
# 5. Release\g2log-FATAL-contract.exe
#
#
# === LINUX: === To try this out from folder g2log:
# mkdir build
# cd build
# >> create makefiles in g2log/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
# mkdir build && cd build
# cmake -DCMAKE_CXX_COMPILER=clang++ ..
# if you want to double-check settings: "VERBOSE=1 make"
# otherwise just run: "make -j"
#
# ============================================================================
cmake_minimum_required (VERSION 2.8)
ENABLE_LANGUAGE(CXX)
set(CMAKE_BUILD_TYPE Release)
project (g3log)
# Detect 64 or 32 bit
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
# 64-bit project
SET(64_BIT_OS TRUE)
MESSAGE("A 64-bit OS detected")
else()
SET(64_BIT_OS FALSE)
MESSAGE("A 32-bit OS detected")
endif()
# =========================================================================
# G3LOG BUILD
#==========================================================================
INCLUDE (${g3log_SOURCE_DIR}/Build.cmake)
# ============================================================================
# G3LOG DYNAMIC LEVELS OPTIONS
# ============================================================================
# ENABLE WITH: -USE_DYNAMIC_LOGGING_LEVELS=ON : run-type turn on/off levels
INCLUDE (${g3log_SOURCE_DIR}/Dynamic.cmake)
# ============================================================================
# EXAMPLE OPTIONS: By defauls is ON. This will create 'g3log-FATAL-* examples'
# ============================================================================
# DISABLE WITH: -DUSE_SIMPLE_EXAMPLE=OFF
INCLUDE (${g3log_SOURCE_DIR}/example/Example.cmake)
# ============================================================================
# PERFORMANCE TEST OPTIONS: Performance operations for g3log
# ============================================================================
# ENABLE WITH: -USE_G2LOG_PERFORMANCE=ON
INCLUDE (${g3log_SOURCE_DIR}/test_performance/Performance.cmake)
# ==========================================================================
# UNIT TEST OPTIONS:
# ============================================================================
# ENABLE WITH: -DUSE_G2LOG_UNIT_TEST=ON
INCLUDE (${g3log_SOURCE_DIR}/test_unit/Test.cmake)
# ==========================================================================
# BETA : package manager for G3Log,. not yet reliable. Use at your own risk
# ==========================================================================
# Package handling is done AFTER all other CMake setup
#
# usage: make package
#
# Check the output result and install accordingly.
# ==========================================================================
INCLUDE (${g3log_SOURCE_DIR}/CPackLists.txt)