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

bump minimum required cmake to 3.0 in test #2798

Merged
merged 2 commits into from Aug 5, 2017

Conversation

kleinhenz
Copy link
Contributor

On MacOS with cmake 3.9.0 on the current master the test

tests/unit/build/CMakeFiles/cmake_build_dir_test.make_configure

fails to compile with the error

  ERROR: Compilers do not match.  In order to compile HPX application it is
  recommended to use the same compiler as you did for HPX.
  HPX_CXX_COMPILER=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++,
  CMAKE_CXX_COMPILER=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++.
  HPX_CXX_COMPILER_ID=AppleClang, CMAKE_CXX_COMPILER_ID=Clang.  To disable
  this message set HPX_IGNORE_COMPILER_COMPATIBILITY to On.
Call Stack (most recent call first):
  /Users/Joseph/Documents/umich/research/libraries/hpx/build/lib/cmake/HPX/HPXMacros.cmake:26 (hpx_error)
  /Users/Joseph/Documents/umich/research/libraries/hpx/build/lib/cmake/HPX/HPXConfig.cmake:64 (hpx_check_compiler_compatibility)
  CMakeLists.txt:12 (find_package)

This is because cmake_minimum_required(VERSION 2.8) sets the cmake policies so that the compiler id is set to Clang instead of AppleClang. This behavior was changed in cmake version 3.0. See https://cmake.org/cmake/help/v3.0/policy/CMP0025.html

This commit bumps the required cmake version in the test to 3.0 to fix this error.

Necessary on MacOS to set policies so that CMAKE_CXX_COMPILER_ID is
AppleClang instead of Clang to match HPX_CXX_COMPILER_ID
@hkaiser
Copy link
Member

hkaiser commented Aug 4, 2017

We just bumped the minimal cmake version to 3.3.2 (https://github.com/STEllAR-GROUP/hpx/blob/master/CMakeLists.txt#L14) but while doing so missed to change it in this spot, unfortunately. Thanks for reporting this and providing a PR. Could you please adapt your PR such that it requires 3.3.2 as well?

Copy link
Member

@hkaiser hkaiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks a lot!

@hkaiser hkaiser merged commit 7111052 into STEllAR-GROUP:master Aug 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants