forked from boostorg/mp11
Add cmake_subdir_test
This commit is contained in:
1 parent
8c278c84dd
commit
1a7fc19caa
3 files changed
+36
-1
No files matched your search
@@ -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>)
|
||||
@@ -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