Commit 4d38707c authored by Michaël Roynard's avatar Michaël Roynard

Merge branch 'dev' into 'master'

Switch to a less intrusive cmake integration

See merge request !9
parents 71e5c7e7 8bf81f8b
Pipeline #7335 failed with stages
in 33 seconds
{}
\ No newline at end of file
{
"cmake.configureOnOpen": false
}
\ No newline at end of file
......@@ -2,9 +2,6 @@ cmake_minimum_required(VERSION 3.8.2) # required for cxx_std_17
project(Concepts-For-Images VERSION 0.2 LANGUAGES CXX)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)
SET(COMPILER_CLANG OFF)
SET(COMPILER_GCC OFF)
SET(COMPILER_ICC OFF)
......
......@@ -7,7 +7,7 @@ class ConceptsForImages(ConanFile):
url = "https://gitlab.lrde.epita.fr/mroynard/concepts-for-images"
description = "Images concepts implementation in C++17."
settings = "os", "compiler", "arch", "build_type", "cppstd"
generators = "cmake"
generators = "cmake_find_package"
def source(self):
git = tools.Git()
......
set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})
find_package(concepts-fundamentals REQUIRED)
find_package(blackmagic REQUIRED)
set(CONCEPTS-FOR-IMAGES_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/include")
add_library(Concepts-For-Images INTERFACE)
target_compile_features(Concepts-For-Images INTERFACE cxx_std_17)
target_include_directories(Concepts-For-Images INTERFACE ${CONCEPTS-FOR-IMAGES_INCLUDE_DIR})
target_link_libraries(Concepts-For-Images INTERFACE CONAN_PKG::blackmagic CONAN_PKG::concepts-fundamentals)
target_link_libraries(Concepts-For-Images INTERFACE blackmagic::blackmagic concepts-fundamentals::concepts-fundamentals)
target_compile_options(Concepts-For-Images INTERFACE -fconcepts) # Gcc experimental concept support
......
......@@ -9,7 +9,7 @@ macro(add_unit_test Executable Source)
add_executable(test_${Executable} EXCLUDE_FROM_ALL ${Source})
add_test(NAME test_${Executable} COMMAND test_${Executable} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/test)
target_link_libraries(test_${Executable} PRIVATE Concepts-For-Images CONAN_PKG::gtest Threads::Threads)
target_link_libraries(test_${Executable} PRIVATE Concepts-For-Images gtest::gtest Threads::Threads)
target_include_directories(test_${Executable} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
if(PLATFORM_UNIX AND COMPILER_CLANG)
......@@ -23,7 +23,9 @@ option(WITH_TESTS "Compile and run tests" ON)
# if(WITH_TESTS)
find_package(Threads REQUIRED)
add_subdirectory(concepts-for-images)
set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})
find_package(gtest REQUIRED)
find_package(Threads REQUIRED)
add_subdirectory(concepts-for-images)
# endif(WITH_TESTS)
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