refactor catch2 dep to use find_package. fix for #9

This commit is contained in:
Balazs Benics 2019-07-27 18:51:45 +02:00 committed by Daniil Goncharov
parent 292ee8ace8
commit 6f6871dd4b
5 changed files with 6 additions and 15028 deletions

View file

@ -2,6 +2,8 @@
project(nameof VERSION "0.9.0" LANGUAGES CXX)
include(${CMAKE_BINARY_DIR}/conan_paths.cmake OPTIONAL)
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
set(IS_TOPLEVEL_PROJECT TRUE)
else()

View file

@ -1,23 +0,0 @@
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,7 @@
include(CheckCXXCompilerFlag)
find_package(Catch2 REQUIRED)
set(SOURCES test.cpp)
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
@ -23,8 +25,8 @@ endif()
function(make_test target std)
add_executable(${target} ${SOURCES})
target_compile_options(${target} PRIVATE ${OPTIONS})
target_include_directories(${target} PRIVATE 3rdparty/Catch2)
target_link_libraries(${target} PRIVATE ${CMAKE_PROJECT_NAME})
target_link_libraries(${target} PRIVATE Catch2::Catch2)
if(std)
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
target_compile_options(${target} PRIVATE /std:${std})

View file

@ -21,7 +21,7 @@
// SOFTWARE.
#define CATCH_CONFIG_MAIN
#include <catch.hpp>
#include <catch2/catch.hpp>
#define NAMEOF_ENUM_RANGE_MIN -120
#define NAMEOF_ENUM_RANGE_MAX 120