forked from boostorg/mp11
Add cmake_subdir_test
This commit is contained in:
17
test/cmake_subdir_test/CMakeLists.txt
Normal file
17
test/cmake_subdir_test/CMakeLists.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
# Copyright 2018 Peter Dimov
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(cmake_subdir_test LANGUAGES CXX)
|
||||
|
||||
add_subdirectory(../.. boostorg/mp11)
|
||||
|
||||
add_executable(main main.cpp)
|
||||
target_link_libraries(main Boost::mp11)
|
||||
|
||||
enable_testing()
|
||||
add_test(NAME main COMMAND main)
|
||||
|
||||
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
|
||||
8
test/cmake_subdir_test/main.cpp
Normal file
8
test/cmake_subdir_test/main.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <boost/mp11.hpp>
|
||||
using namespace boost::mp11;
|
||||
|
||||
int main()
|
||||
{
|
||||
using L1 = mp_list<int, float, int, float>;
|
||||
return mp_size<mp_unique<L1>>::value == 2? 0: 1;
|
||||
}
|
||||
Reference in New Issue
Block a user