Commit 40b5803b authored by Michaël Roynard's avatar Michaël Roynard

Switch to a less intrusive generator

parent a75aadf9
Pipeline #3425 failed with stages
in 54 seconds
......@@ -2,9 +2,6 @@ cmake_minimum_required(VERSION 3.8.2) # required for cxx_std_17
project(GTest-constexpr-ext VERSION 0.0.1 LANGUAGES CXX)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)
SET(COMPILER_CLANG OFF)
SET(COMPILER_GCC OFF)
SET(COMPILER_ICC OFF)
......
......@@ -8,7 +8,7 @@ class GtestConstexprExt(ConanFile):
url = "https://gitlab.lrde.epita.fr/mroynard/gtest-constexpr-ext"
description = "Add macro to detect whether an expression is compile-time."
settings = "os", "compiler", "arch", "build_type", "cppstd"
generators = "cmake"
generators = "cmake_find_package"
def source(self):
git = tools.Git()
......
find_package(gtest REQUIRED)
set(GTEST_CONSTEXPR_EXT_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/include")
add_library(Gtest-constexpr-ext INTERFACE)
target_compile_features(Gtest-constexpr-ext INTERFACE cxx_std_17)
target_include_directories(Gtest-constexpr-ext INTERFACE ${GTEST_CONSTEXPR_EXT_INCLUDE_DIR})
target_link_libraries(Gtest-constexpr-ext INTERFACE CONAN_PKG::gtest)
target_link_libraries(Gtest-constexpr-ext INTERFACE gtest::gtest)
find_package(Threads REQUIRED)
target_link_libraries(Gtest-constexpr-ext INTERFACE Threads::Threads)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment