2015-07-16 09:55:23 +02:00
|
|
|
# ==========================================================================
|
|
|
|
# 2015 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.
|
|
|
|
#
|
|
|
|
# For more information see g3log/LICENSE or refer refer to http://unlicense.org
|
|
|
|
# ============================================================================*/
|
|
|
|
|
2015-07-13 15:49:44 +02:00
|
|
|
# Prerequisite : Options.cmake should run first
|
|
|
|
|
|
|
|
SET(HEADER "/** ==========================================================================
|
2015-07-16 08:27:17 +02:00
|
|
|
* 2015 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.
|
|
|
|
*
|
|
|
|
* For more information see g3log/LICENSE or refer refer to http://unlicense.org
|
|
|
|
* ============================================================================*/")
|
2015-07-13 15:49:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-31 06:52:09 +02:00
|
|
|
MESSAGE("")
|
|
|
|
MESSAGE("COMPILE_DEFINITIONS:\n\t[${G3_DEFINITIONS}]")
|
|
|
|
MESSAGE("")
|
2017-05-09 18:26:48 +02:00
|
|
|
SET(GENERATED_G3_DEFINITIONS "${CMAKE_CURRENT_BINARY_DIR}/include/g3log/generated_definitions.hpp")
|
2015-07-16 08:27:17 +02:00
|
|
|
file(REMOVE ${GENERATED_G3_DEFINITIONS} )
|
|
|
|
FILE(WRITE ${GENERATED_G3_DEFINITIONS} "// AUTO GENERATED MACRO DEFINITIONS FOR G3LOG\n\n")
|
2015-07-16 09:55:23 +02:00
|
|
|
FILE(APPEND ${GENERATED_G3_DEFINITIONS} "${HEADER}\n")
|
2015-07-16 08:27:17 +02:00
|
|
|
FILE(APPEND ${GENERATED_G3_DEFINITIONS} "#pragma once\n\n")
|
|
|
|
FILE(APPEND ${GENERATED_G3_DEFINITIONS} "// CMake induced definitions below. See g3log/Options.cmake for details.\n\n")
|
2015-07-13 15:49:44 +02:00
|
|
|
|
|
|
|
FOREACH(definition ${G3_DEFINITIONS} )
|
2015-07-16 08:27:17 +02:00
|
|
|
FILE(APPEND ${GENERATED_G3_DEFINITIONS} "#define ${definition}\n")
|
2015-07-13 15:49:44 +02:00
|
|
|
ENDFOREACH(definition)
|
2015-07-16 08:27:17 +02:00
|
|
|
|
|
|
|
MESSAGE("Generated ${GENERATED_G3_DEFINITIONS}")
|
|
|
|
file(READ ${GENERATED_G3_DEFINITIONS} generated_content)
|
|
|
|
|
|
|
|
MESSAGE("******************** START *************************")
|
|
|
|
MESSAGE(${generated_content})
|
|
|
|
MESSAGE("******************** END *************************")
|