Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/CMakeLists.txt uses target_sources but says it works with CMake 2.8.1 #2728

Closed
fove-robin opened this issue Sep 1, 2017 · 4 comments
Closed

Comments

@fove-robin
Copy link
Contributor

Please use this template for reporting suspected bugs or requests for help.

Issue description

tests/CMakeLists.txt uses CMake's target_sources, which was only added in CMake 3.1.
cmake_minimum_required is set to 2.8.1 in that file, and 2.8.12 in the project root.

This is causing libzmq project's Jenkins to fail:
https://libzmq.cloudapp.net/job/libzmq/1820/console

Note Jenkins isn't reporting the problem, but it's not exactly working either...

Environment

  • libzmq version (commit hash if unreleased): d5e4319
  • OS: all
  • CMake: before v3.1

Minimal test code / Steps to reproduce the issue

  1. kick off CI on Jenkins

What's the actual result? (include assertion message & call stack if applicable)

CMake Error at tests/CMakeLists.txt:184 (target_sources):
  Unknown CMake command "target_sources".

What's the expected result?

Jenkins should build, not just flake out and say "SUCCESS!" (Fixing Jenkins itself is a separate issue I guess...?)

@bluca
Copy link
Member

bluca commented Sep 1, 2017

Not sure where the Jenkins script actually is unfortunately.

Any idea how to do the same CMake thing without target_sources?

bluca added a commit to bluca/libzmq that referenced this issue Sep 1, 2017
Solution: remove redundant target_sources directive
Fixes zeromq#2728
@bluca
Copy link
Member

bluca commented Sep 1, 2017

Well it looks like those directives are not actually needed - testing without them right now

@bluca
Copy link
Member

bluca commented Sep 1, 2017

Sigh it looks like it's necessary on Windows, not on *nix

@bluca
Copy link
Member

bluca commented Sep 1, 2017

I have a different solution - a bit clunkier but it seems to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants