1
0
mirror of https://github.com/catchorg/Catch2.git synced 2025-01-15 14:48:00 +00:00

Compare commits

...

3 Commits

Author SHA1 Message Date
Martin Hořeňovský
acf975cab1
Separate version macros to its own header 2020-01-19 15:39:11 +01:00
Martin Hořeňovský
ec7280379e
Adjust release scripts for v3 2020-01-19 15:39:11 +01:00
offa
21868deeab Conanfile updated to build the static libraries. 2020-01-19 14:59:33 +01:00
5 changed files with 46 additions and 24 deletions

View File

@ -10,18 +10,28 @@ class CatchConan(ConanFile):
homepage = url
license = "BSL-1.0"
exports = "LICENSE.txt"
exports_sources = ("single_include/*", "CMakeLists.txt", "CMake/*", "contrib/*")
exports_sources = ("src/*", "CMakeLists.txt", "CMake/*", "extras/*")
settings = "os", "compiler", "build_type", "arch"
generators = "cmake"
def package(self):
def _configure_cmake(self):
cmake = CMake(self)
cmake.definitions["BUILD_TESTING"] = "OFF"
cmake.definitions["CATCH_INSTALL_DOCS"] = "OFF"
cmake.definitions["CATCH_INSTALL_HELPERS"] = "ON"
cmake.configure(build_folder='build')
cmake.configure(build_folder="build")
return cmake
def build(self):
cmake = self._configure_cmake()
cmake.build()
def package(self):
self.copy(pattern="LICENSE.txt", dst="licenses")
cmake = self._configure_cmake()
cmake.install()
self.copy(pattern="LICENSE.txt", dst="licenses")
def package_id(self):
self.info.header_only()
def package_info(self):
self.cpp_info.libs = ['Catch2Main', 'Catch2']
self.cpp_info.names["cmake_find_package"] = "Catch2"
self.cpp_info.names["cmake_find_package_multi"] = "Catch2"

View File

@ -115,6 +115,7 @@ set(INTERNAL_HEADERS
${SOURCES_DIR}/catch_uncaught_exceptions.h
${SOURCES_DIR}/catch_user_interfaces.h
${SOURCES_DIR}/catch_version.h
${SOURCES_DIR}/catch_version_macros.hpp
${SOURCES_DIR}/catch_wildcard_pattern.h
${SOURCES_DIR}/catch_windows_h_proxy.h
${SOURCES_DIR}/catch_xmlwriter.h

View File

@ -9,9 +9,7 @@
#ifndef TWOBLUECUBES_CATCH_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_HPP_INCLUDED
#define CATCH_VERSION_MAJOR 2
#define CATCH_VERSION_MINOR 10
#define CATCH_VERSION_PATCH 2
#include <catch2/catch_version_macros.hpp>
#ifdef __clang__
# pragma clang system_header

View File

@ -0,0 +1,13 @@
/*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef TWOBLUECUBES_CATCH_VERSION_MACROS_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_VERSION_MACROS_HPP_INCLUDED
#define CATCH_VERSION_MAJOR 2
#define CATCH_VERSION_MINOR 10
#define CATCH_VERSION_PATCH 2
#endif // TWOBLUECUBES_CATCH_VERSION_MACROS_HPP_INCLUDED

View File

@ -10,9 +10,9 @@ import fnmatch
from scriptCommon import catchPath
versionParser = re.compile( r'(\s*static\sVersion\sversion)\s*\(\s*(.*)\s*,\s*(.*)\s*,\s*(.*)\s*,\s*\"(.*)\"\s*,\s*(.*)\s*\).*' )
rootPath = os.path.join( catchPath, 'include/' )
versionPath = os.path.join( rootPath, "internal/catch_version.cpp" )
definePath = os.path.join(rootPath, 'catch.hpp')
rootPath = os.path.join( catchPath, 'src/catch2' )
versionPath = os.path.join( rootPath, "catch_version.cpp" )
definePath = os.path.join(rootPath, 'catch_version_macros.hpp')
readmePath = os.path.join( catchPath, "README.md" )
cmakePath = os.path.join(catchPath, 'CMakeLists.txt')
@ -149,18 +149,18 @@ def performUpdates(version):
version.updateVersionFile()
updateVersionDefine(version)
import generateSingleHeader
generateSingleHeader.generate(version)
# import generateSingleHeader
# generateSingleHeader.generate(version)
# Then copy the reporters to single include folder to keep them in sync
# We probably should have some kind of convention to select which reporters need to be copied automagically,
# but this works for now
import shutil
for rep in ('automake', 'tap', 'teamcity', 'sonarqube'):
sourceFile = os.path.join(catchPath, 'include/reporters/catch_reporter_{}.hpp'.format(rep))
destFile = os.path.join(catchPath, 'single_include', 'catch2', 'catch_reporter_{}.hpp'.format(rep))
shutil.copyfile(sourceFile, destFile)
# # Then copy the reporters to single include folder to keep them in sync
# # We probably should have some kind of convention to select which reporters need to be copied automagically,
# # but this works for now
# import shutil
# for rep in ('automake', 'tap', 'teamcity', 'sonarqube'):
# sourceFile = os.path.join(catchPath, 'include/reporters/catch_reporter_{}.hpp'.format(rep))
# destFile = os.path.join(catchPath, 'single_include', 'catch2', 'catch_reporter_{}.hpp'.format(rep))
# shutil.copyfile(sourceFile, destFile)
updateReadmeFile(version)
# updateReadmeFile(version)
updateCmakeFile(version)
updateDocumentationVersionPlaceholders(version)