Skip to content

Commit

Permalink
ci: Exclude cpp sample from all and build explicitly in build-ci
Browse files Browse the repository at this point in the history
Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha committed Mar 23, 2024
1 parent 08a8be8 commit da02bcc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Configure
run: cmake -DCMAKE_BUILD_TYPE=Debug .
- name: Build
run: cmake --build . --parallel 7
run: cmake --build . --parallel 7 --target all --target cpp_cp_sample --target cpp_pd_sample
- name: Package
run: cmake --build . --target package --target package_source
- uses: actions/upload-artifact@v2
Expand Down
5 changes: 5 additions & 0 deletions examples/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,10 @@ set(PD_SAMPLE cpp_pd_sample)
add_executable(${CP_SAMPLE} cp_app.cpp)
add_executable(${PD_SAMPLE} pd_app.cpp)

# CPP sample does not build in some old compilers and causes relase checks to
# fail. So let's exclude this from all for now; CI will still test this target.
set_target_properties(${CP_SAMPLE} PROPERTIES EXCLUDE_FROM_ALL TRUE)
set_target_properties(${PD_SAMPLE} PROPERTIES EXCLUDE_FROM_ALL TRUE)

target_link_libraries(${CP_SAMPLE} PRIVATE $<IF:$<TARGET_EXISTS:osdp>,osdp,osdpstatic>)
target_link_libraries(${PD_SAMPLE} PRIVATE $<IF:$<TARGET_EXISTS:osdp>,osdp,osdpstatic>)

0 comments on commit da02bcc

Please sign in to comment.