mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 13:55:39 +02:00
Add support for Components
This commit is contained in:

committed by
Martin Hořeňovský

parent
67a9561fb5
commit
3a15433d52
@@ -1,19 +1,12 @@
|
||||
cmake_minimum_required(VERSION 3.2.0)
|
||||
project(test_package CXX)
|
||||
|
||||
# We set it only for the convenience of calling the executable
|
||||
# in the package test function
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||
include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
|
||||
conan_basic_setup()
|
||||
|
||||
find_package(Catch2 REQUIRED CONFIG)
|
||||
|
||||
add_executable(${PROJECT_NAME} test_package.cpp)
|
||||
# Note: Conan 1.21 doesn't support granular target generation yet.
|
||||
# The Main library would be included into the unified target.
|
||||
# It's controlled by the `with_main` option in the recipe.
|
||||
target_link_libraries(${PROJECT_NAME} Catch2::Catch2)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} Catch2::Catch2WithMain)
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 14)
|
||||
|
Reference in New Issue
Block a user