1 # Copyright 2021 Alexander Grund
2 # Distributed under the Boost Software License, Version 1.0.
3 # See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
5 cmake_minimum_required(VERSION 3.5...3.16)
7 project(cmake_subdir_test LANGUAGES CXX)
9 # Those 2 should work the same
10 # while using find_package for the installed Boost avoids the need to manually specify dependencies
11 if(DEFINED BOOST_CI_INSTALL_TEST AND BOOST_CI_INSTALL_TEST)
12 find_package(boost_nowide 1.78 REQUIRED)
13 elseif(DEFINED BOOST_NOWIDE_INSTALL_TEST AND BOOST_NOWIDE_INSTALL_TEST)
14 find_package(boost_nowide 11 REQUIRED)
16 add_subdirectory(../../../config boostorg/config)
17 add_subdirectory(../.. boostorg/nowide)
20 add_executable(main main.cpp)
21 target_link_libraries(main Boost::nowide)
24 add_test(NAME main COMMAND main)