From b7d007bd097cfe853b053c109eddc2edbaee36f3 Mon Sep 17 00:00:00 2001 From: Flamefire Date: Sat, 28 Dec 2019 16:35:20 +0100 Subject: [PATCH] Disable installation when used with boost superproject --- .github/workflows/ci_tests.yml | 4 ++-- CMakeLists.txt | 1 + appveyor.yml | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 447e041..52f7425 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -84,13 +84,13 @@ jobs: run: mkdir __build_static __build_shared - name: Configure static working-directory: __build_static - run: cmake .. -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=nowide -DCMAKE_BUILD_TYPE=Debug -DBOOST_NOWIDE_INSTALL=OFF + run: cmake .. -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=nowide -DCMAKE_BUILD_TYPE=Debug - name: Build & Test static working-directory: __build_static run: cmake --build . --config Debug && ctest --output-on-failure --build-config Debug - name: Configure shared working-directory: __build_shared - run: cmake .. -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=nowide -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON -DBOOST_NOWIDE_INSTALL=OFF + run: cmake .. -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=nowide -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON - name: Build & Test shared working-directory: __build_shared run: cmake --build . --config Debug && ctest --output-on-failure --build-config Debug diff --git a/CMakeLists.txt b/CMakeLists.txt index 36834f1..571839b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,6 +56,7 @@ if(BOOST_NOWIDE_STANDALONE) else() if(BOOST_SUPERPROJECT_SOURCE_DIR) target_link_libraries(boost_nowide PUBLIC Boost::config Boost::smart_ptr Boost::static_assert) + set(BOOST_NOWIDE_INSTALL OFF) # smart_ptr does not support installation else() # Default boost libs are static on windows and dynamic on linux if(WIN32 AND NOT DEFINED Boost_USE_STATIC_LIBS) diff --git a/appveyor.yml b/appveyor.yml index 15099b0..ea9e7f0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -87,7 +87,7 @@ test_script: ./b2 --clean mkdir __build_static | cd - cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=nowide -DBOOST_NOWIDE_INSTALL=OFF .. + cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=nowide .. cmake --build . --config Debug ctest --output-on-failure --build-config Debug cmake --build . --config Release @@ -96,7 +96,7 @@ test_script: cd .. mkdir __build_shared | cd - cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBUILD_SHARED_LIBS=ON -DBOOST_INCLUDE_LIBRARIES=nowide -DBOOST_NOWIDE_INSTALL=OFF .. + cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBUILD_SHARED_LIBS=ON -DBOOST_INCLUDE_LIBRARIES=nowide .. cmake --build . --config Debug ctest --output-on-failure --build-config Debug cmake --build . --config Release