Skip to content

Commit

Permalink
Supporting CMP0167 boost finding cmake policy.
Browse files Browse the repository at this point in the history
  • Loading branch information
arobenko committed Sep 18, 2024
1 parent a63da18 commit e08458b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/actions_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,8 @@ jobs:
working-directory: ${{runner.workspace}}/build
run: |
cmake %GITHUB_WORKSPACE% -A ${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install ^
-DCMAKE_PREFIX_PATH="${{runner.workspace}}/build/install;${{env.QTDIR}}" -DBoost_USE_STATIC_LIBS=ON ^
-DCMAKE_PREFIX_PATH="${{runner.workspace}}/build/install;${{env.QTDIR}}" ^
-DCMAKE_POLICY_DEFAULT_CMP0167=OLD -DBoost_USE_STATIC_LIBS=ON ^
-DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DUBLOX_TOOLS_QT_VER=${{matrix.qt_ver}} ^
-DUBLOX_GEN_PROTOCOL=ON -DUBLOX_GEN_TEST=ON -DUBLOX_GEN_TOOLS=ON -DUBLOX_BUILD_TOOLS=${{env.BUILD_TOOLS}} ^
-DUBLOX_BUILD_EXAMPLES=ON ^
Expand Down Expand Up @@ -617,7 +618,7 @@ jobs:
if: matrix.arch == 'x64'
shell: cmd
run: |
choco install boost-msvc-14.3
choco install boost-msvc-14.3 --version=1.85.0
- name: Prepare externals
shell: cmd
Expand All @@ -640,7 +641,8 @@ jobs:
working-directory: ${{runner.workspace}}/build
run: |
cmake %GITHUB_WORKSPACE% -A ${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install ^
-DCMAKE_PREFIX_PATH="${{runner.workspace}}/build/install" -DBoost_USE_STATIC_LIBS=ON ^
-DCMAKE_PREFIX_PATH="${{runner.workspace}}/build/install" ^
-DCMAKE_POLICY_DEFAULT_CMP0167=OLD -DBoost_USE_STATIC_LIBS=ON ^
-DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DUBLOX_TOOLS_QT_VER=${{matrix.qt_ver}} ^
-DUBLOX_GEN_PROTOCOL=ON -DUBLOX_GEN_TEST=ON -DUBLOX_BUILD_EXAMPLES=${{env.HAS_BOOST}} ^
-DUBLOX_SCHEMA_FILES_LIST_FILE=%GITHUB_WORKSPACE%/basic_msgs.txt
Expand Down
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ option (UBLOX_BUILD_EXAMPLES "Build examples." OFF)
set (UBLOX_VERSION "2.8.1")
set (UBLOX_MIN_COMMSDSL_VERSION "6.3.4")

if (("${CMAKE_VERSION}" VERSION_GREATER_EQUAL "3.30") AND
(NOT DEFINED CMAKE_POLICY_DEFAULT_CMP0167))
# Find boost cmake configuration from the boost installation
cmake_policy(SET CMP0167 NEW)
endif ()

set (EXTERNALS_DIR "${PROJECT_SOURCE_DIR}/externals")

set (PROT_OUTPUT_TGT "prot_output_tgt")
Expand Down

0 comments on commit e08458b

Please sign in to comment.