Opened 23 months ago

Closed 18 months ago

Last modified 18 months ago

#2981 closed defect (fixed)

CMake 3.12 and 3.13 support

Reported by: GaryM Owned by:
Priority: breaks build Milestone: Iteration I4
Component: infrastructure Keywords:
Cc: Estimated pair-hours remaining: 0
Pair-hours expended on ticket: 0.5 Initial estimate of effort: 1
Editable by public: yes

Description

Just tried to build with this and it says:

CMake Error at /export/chaste-builds/CMakeFiles/CMakeTmp/cmTC_67f31Targets.cmake:16 (add_library):
  Target "MPI::MPI_C" links to item " -Wl,-rpath -Wl,/usr/lib/openmpi/lib
  -Wl,--enable-new-dtags" which has leading or trailing whitespace.  This is
  now an error according to policy CMP0004.
Call Stack (most recent call first):
  /export/chaste-builds/CMakeFiles/CMakeTmp/CMakeLists.txt:13 (include)


CMake Error at /export/chaste-builds/CMakeFiles/CMakeTmp/cmTC_67f31Targets.cmake:16 (add_library):
  Target "MPI::MPI_C" links to item " -Wl,-rpath -Wl,/usr/lib/openmpi/lib
  -Wl,--enable-new-dtags" which has leading or trailing whitespace.  This is
  now an error according to policy CMP0004.
Call Stack (most recent call first):
  /export/chaste-builds/CMakeFiles/CMakeTmp/CMakeLists.txt:13 (include)


CMake Error at /usr/local/share/cmake-3.12/Modules/FindMPI.cmake:1182 (try_compile):
  Failed to generate test project build system.
Call Stack (most recent call first):
  /usr/local/share/cmake-3.12/Modules/FindMPI.cmake:1223 (_MPI_try_staged_settings)
  /usr/local/share/cmake-3.12/Modules/FindMPI.cmake:1483 (_MPI_check_lang_works)
  CMakeLists.txt:404 (find_package)


-- Configuring incomplete, errors occurred!

Probably a matter of removing leading and trailing whitespace from somewhere within the CMake instructions!

Change History (4)

comment:1 Changed 18 months ago by GaryM

  • Summary changed from CMake 3.12 support to CMake 3.12 and 3.13 support

comment:2 Changed 18 months ago by fcooper

I'm using CMake 3.13 and have been for a while - I'm not able to reproduce this.

Gary, do you still have an example of it failing?

comment:3 Changed 18 months ago by GaryM

  • Estimated pair-hours remaining changed from 1 to 0
  • Pair-hours expended on ticket changed from 0 to 0.5
  • Resolution set to fixed
  • Status changed from new to closed

I think, like this, that the problem was an unclean cmake build directory with a cache made by older cmake, as this has gone away for me now on 3.12.

comment:4 Changed 18 months ago by GaryM

I've made orange on InstallGuides/DependencyVersions, if they are on regular build machines could you make green Fergus?

Note: See TracTickets for help on using tickets.