<commit_before>
## cmake build script for davix
project (davix)
cmake_minimum_required (VERSION 2.6)

# Find the python executable to use during the build.
find_package(PythonInterp REQUIRED)

#-------------------------------------------------------------------------------
# Regenerate include/davix/features.hpp and version.cmake at _build_ time
#-------------------------------------------------------------------------------
add_custom_target(GenerateVersionInfo ALL DEPENDS Version)
add_custom_command(
  OUTPUT Version
  COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/genversion.py --template include/davix/features.hpp.in --out include/davix/features.hpp
  COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/genversion.py --template version.cmake.in --out version.cmake
  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

#-------------------------------------------------------------------------------
# Regenerate version.cmake at _configure_ time. Important since the above
# only regenerates it at compile time.
#-------------------------------------------------------------------------------
execute_process(
  COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/genversion.py --template version.cmake.in --out version.cmake
  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

#-------------------------------------------------------------------------------
# Include version.cmake. Whenever the version changes, ie you commit or tag,
# the following happens:
# - Next time you run 'make', version.cmake is updated.
# - The next 'make' will detect version.cmake was changed, and cmake will
#   reconfigure itself.
#
# A bit hacky.
#-------------------------------------------------------------------------------
include(release.cmake REQUIRED)
include(version.cmake)
message("Configuring cmake for davix version: ${VERSION_FULL}")

set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/")
option(SHARED_LIBRARY "generate shared library" TRUE)
option(STATIC_LIBRARY  "generate static library" FALSE)


# build type
if(NOT CMAKE_BUILD_TYPE)
    message(STATUS "No build type selected, default to RelWithDebInfo")
    set(CMAKE_BUILD_TYPE "RelWithDebInfo")
endif(NOT CMAKE_BUILD_TYPE)

# load module
include(DefineInstallationPaths REQUIRED)
include(ReleaseDebugAutoFlags REQUIRED)
include(CMakeGeneratePkgConfig REQUIRED)
include(MacroAddDoxygen REQUIRED)
include(CMakeCXX11Support REQUIRED)
include(PortabilityGNUCheck REQUIRED)<commit_msg>Specify full path for release.cmake / version.cmake<commit_after>
## cmake build script for davix
project (davix)
cmake_minimum_required (VERSION 2.6)

# Find the python executable to use during the build.
find_package(PythonInterp REQUIRED)

#-------------------------------------------------------------------------------
# Regenerate include/davix/features.hpp and version.cmake at _build_ time
#-------------------------------------------------------------------------------
add_custom_target(GenerateVersionInfo ALL DEPENDS Version)
add_custom_command(
  OUTPUT Version
  COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/genversion.py --template include/davix/features.hpp.in --out include/davix/features.hpp
  COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/genversion.py --template version.cmake.in --out version.cmake
  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

#-------------------------------------------------------------------------------
# Regenerate version.cmake at _configure_ time. Important since the above
# only regenerates it at compile time.
#-------------------------------------------------------------------------------
execute_process(
  COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/genversion.py --template version.cmake.in --out version.cmake
  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

#-------------------------------------------------------------------------------
# Include version.cmake. Whenever the version changes, ie you commit or tag,
# the following happens:
# - Next time you run 'make', version.cmake is updated.
# - The next 'make' will detect version.cmake was changed, and cmake will
#   reconfigure itself.
#
# A bit hacky.
#-------------------------------------------------------------------------------
include(${CMAKE_CURRENT_SOURCE_DIR}/release.cmake REQUIRED)
include(${CMAKE_CURRENT_SOURCE_DIR}/version.cmake)
message("Configuring cmake for davix version: ${VERSION_FULL}")

set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/")
option(SHARED_LIBRARY "generate shared library" TRUE)
option(STATIC_LIBRARY  "generate static library" FALSE)


# build type
if(NOT CMAKE_BUILD_TYPE)
    message(STATUS "No build type selected, default to RelWithDebInfo")
    set(CMAKE_BUILD_TYPE "RelWithDebInfo")
endif(NOT CMAKE_BUILD_TYPE)

# load module
include(DefineInstallationPaths REQUIRED)
include(ReleaseDebugAutoFlags REQUIRED)
include(CMakeGeneratePkgConfig REQUIRED)
include(MacroAddDoxygen REQUIRED)
include(CMakeCXX11Support REQUIRED)
include(PortabilityGNUCheck REQUIRED)
{'fraction_non_alphanumeric': 0.25972222222222224, 'fraction_numerical': 0.0015873015873015873, 'mean_word_length': 2.342838196286472, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '710537', 'n_tokens_mistral': 1408, 'n_tokens_neox': 1318, 'n_words': 336}