Cleanups of cmake build use support.

This commit is contained in:
Rene Rivera
2019-01-03 21:57:47 -06:00
parent f862009841
commit d33798214d
4 changed files with 59 additions and 28 deletions
+19 -11
View File
@@ -1,21 +1,29 @@
# Copyright 2018 Mike Dev
# Copyright Mike Dev 2018
# Copyright Rene Rivera 2018
# 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
#
# NOTE: This does NOT run the unit tests for Boost.Predef.
# It only tests, if the CMakeLists.txt file in predef's
# root directory works as expected (i.e. it provides the
# target Boost::predef which in turn provides the
# correct include directory )
# See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt
cmake_minimum_required( VERSION 3.5 )
# NOTE:
# This does NOT run the unit tests for Boost.Predef.
# It only tests, if the CMakeLists.txt file in predef's
# root directory works as expected (i.e. it provides the
# target Boost::predef which in turn provides the
# correct include directory )
# We have very simple cmake requirements we we still require the new style
# declarative targets.
cmake_minimum_required( VERSION 3.0 )
project( BoostPredefCMakeSelfTest )
# Process cmake file at root of library and use ${CMAKE_CURRENT_BINARY_DIR}/libs/boost_predef as workspace
# Process cmake file at root of library and use
# ${CMAKE_CURRENT_BINARY_DIR}/libs/boost_predef as workspace
add_subdirectory( ../.. ${CMAKE_CURRENT_BINARY_DIR}/libs/boost_predef )
# The executable just includes a predef header to verify that it's used.
add_executable( boost_predef_cmake_test_prj main.cpp )
# The executable needs to "use" the Predef "library" to get the usage
# requirements added to the executable build.
target_link_libraries( boost_predef_cmake_test_prj Boost::predef )
+16 -4
View File
@@ -1,7 +1,19 @@
// Dummy executable, just to make sure
// that we can find the Boost.predef header files
/*
Copyright Mike Dev 2018
Copyright 2018 Rene Rivera
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
*/
/*
Dummy executable, just to make sure that we can find the Boost.predef header
files.
*/
#include <boost/predef.h>
int main() {
int main()
{
return 0;
}