瀏覽代碼

Conan support (#156); Catch2 dependency added.

main
offa 6 年之前
父節點
當前提交
199e604a53
共有 3 個文件被更改,包括 11 次插入4 次删除
  1. +3
    -0
      CMakeLists.txt
  2. +6
    -0
      conanfile.txt
  3. +2
    -4
      test/CMakeLists.txt

+ 3
- 0
CMakeLists.txt 查看文件

set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_EXTENSIONS OFF)




include("${CMAKE_BINARY_DIR}/conan_paths.cmake" OPTIONAL)


add_library(ScopeGuard INTERFACE) add_library(ScopeGuard INTERFACE)
target_include_directories(ScopeGuard INTERFACE target_include_directories(ScopeGuard INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>

+ 6
- 0
conanfile.txt 查看文件

[requires]
Catch2/2.8.0@catchorg/stable

[generators]
cmake_find_package
cmake_paths

+ 2
- 4
test/CMakeLists.txt 查看文件


add_library(Catch INTERFACE)
target_include_directories(Catch INTERFACE "catch")
find_package(Catch2 REQUIRED)


add_library(Trompeloeil INTERFACE) add_library(Trompeloeil INTERFACE)
target_include_directories(Trompeloeil INTERFACE "trompeloeil") target_include_directories(Trompeloeil INTERFACE "trompeloeil")




add_library(TestMain TestMain.cpp) add_library(TestMain TestMain.cpp)
target_link_libraries(TestMain PUBLIC Catch Trompeloeil)
target_link_libraries(TestMain PUBLIC Catch2::Catch2 Trompeloeil)




function(add_test_suite name) function(add_test_suite name)

Loading…
取消
儲存