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

resolved warning in CMake 3.1 and newer #1380

Merged
merged 2 commits into from Feb 23, 2015

Conversation

Projects
None yet
2 participants
@gentryx
Copy link
Member

commented Feb 22, 2015

With CMake 3.1.0 I get the following warning when building a code that uses HPX:

 CMake Warning (dev) at /home/gentryx/local_install/lib/cmake/hpx/HPX_SetupTarget.cmake:134 (if):
   Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "COMPONENT" will no longer be dereferenced when the
  policy is set to NEW.  Since the policy is not set the OLD behavior will be
  used.
Call Stack (most recent call first):
  /home/gentryx/local_install/lib/cmake/hpx/HPX_AddExecutable.cmake:143 (hpx_setup_target)
  src/examples/gameoflife_hpx/CMakeLists.txt:6 (add_hpx_executable)
This warning is for project developers.  Use -Wno-dev to suppress it.

This commit resolves aforementioned ambiguity.

@hkaiser

This comment has been minimized.

Copy link
Member

commented Feb 23, 2015

Is that really the right fix for the warning? Are we sure that we don't rely on the old behavior anywhere?

@gentryx

This comment has been minimized.

Copy link
Member Author

commented Feb 23, 2015

I'm not making any guarantees, but at least I couldn't find any. Would have been bad style anyway ("foo" certainly doesn't look as if someone meant "${foo}").

@hkaiser

This comment has been minimized.

Copy link
Member

commented Feb 23, 2015

Yah, I think what I really wanted to verify was whether you checked before deciding to go with the new policy setting.

Do we have to wrap that policy setting with a cmake version check?

@gentryx

This comment has been minimized.

Copy link
Member Author

commented Feb 23, 2015

AFAIK older CMake versions simply ignore such policies they don't know about.

hkaiser added a commit that referenced this pull request Feb 23, 2015

Merge pull request #1380 from gentryx/master
resolved warning in CMake 3.1 and newer

@hkaiser hkaiser merged commit cb4efc2 into STEllAR-GROUP:master Feb 23, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.