sofa-framework / sofa

Real-time multi-physics simulation with an emphasis on medical simulation.
https://www.sofa-framework.org
GNU Lesser General Public License v2.1
871 stars 297 forks source link

CMake >= 3.15 fails at configuring stage of sofa 19.06.00 #1105

Closed dweckmann closed 2 years ago

dweckmann commented 4 years ago

Using the newly released CMake 3.15, the configuring stage fails with:

CMake Error at SofaKernel/SofaFramework/SofaMacros.cmake:686 (message): Missing parameter TARGETS. Call Stack (most recent call first): applications/plugins/SofaMiscCollision/CMakeLists.txt:82 (sofa_generate_package)


Suggested labels:

hugtalbot commented 4 years ago

Hi Didier @dweckmann thanks for your feedback! we actually had very recently a discussion about better supporting the latest version of libraries required for SOFA like CMake. Are you using the master branch? because the TARGET parameter seems to be defined.

Whatever, happy to see you back in the game!

dweckmann commented 4 years ago

Yeah, I was testing head of 19.06.00. But I forgot to mention that I'm on macOS, don't know if it is related. A colleague told me that it seems to work on windows.

hugtalbot commented 4 years ago

ok, this might be due to recent changes in the SofaMacros done for the recent release. Let me add @guparan in the discussion !

hugtalbot commented 4 years ago

If you don't hear from us net week, please poke us!

fredroy commented 4 years ago

Just my 2 cents, on macOS 10.14.5, Xcode 10.2.1 , Cmake 3.15.0 and Sofa sync with master, I don't have any error with the configuration. BUT Cmake 3.15.0 wants to link the OpenGL framework from a non-existing /Applications/Xcode-beta.app (I dont have any beta version of XCode), and obviously breaks the make process. So I suppose there are some bugs in the 3.15.0 version of cmake.

guparan commented 4 years ago

Weird, I don't see how TARGETS could be empty here. Could you try with another CMake version?

hugtalbot commented 4 years ago

Hi @dweckmann any update ?

fbridault commented 4 years ago

Yup same problem here on Windows... Really weird I can't understand why that fails, the call and the function look correct.

fbridault commented 4 years ago

Ok I got it. Somehow TARGETS looks considered as a special keyword. If you rename the argument by anything else, like SOFA_TARGETS, that works. We should look if this is a reported bug of CMake.

guparan commented 4 years ago

Hi @fbridault could you share your CMakeCache.txt? I can't reproduce this error on Windows (tried with CMake 3.15.[0,1,2]) :confused:

fbridault commented 4 years ago

Here it is with CMake 3.15.2, Visual Studio 17 (Visual Compiler 15) CMakeCache.txt

hugtalbot commented 4 years ago

@guparan have you taken a look?

hugtalbot commented 4 years ago

Hi @fbridault Did you give a try to the latest v19.12 ? If you face any issue, please poke me directly. I want to make sure your integration is working fine. Best.

hugtalbot commented 4 years ago

Hey @fbridault @dweckmann I am writing again on this issue since our Technical Committee is approaching and its associated coding spring (29-30th April). Any update on your side?

fbridault commented 4 years ago

We will have a look and keep you aware.

hugtalbot commented 4 years ago

cool! Thanks @fbridault let us know anytime!

hugtalbot commented 3 years ago

@dweckmann @fbridault do not hesitate to keep us posted. If you'd like join the SOFA Week 2020: https://www.sofa-framework.org/sofa-events/sofa-week-2020/ and its coding sprint (Thurs.+Friday)

fredroy commented 3 years ago

Any news about this issue ? @fbridault @dweckmann