-
-
Notifications
You must be signed in to change notification settings - Fork 362
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
Fails to build with CMake 3.12.x #5646
Comments
The error is caused by CMP0026, and the workaround is:
|
So does setting the policy resolve this? In the longer term the use of See CMake generator expressions: https://stackoverflow.com/questions/28692896/how-to-use-cmake-generator-expression-target-filetgt So the following:
becomes (similar to):
With regards to CMake versions, does anyone know if is there a minimum or recommended supported version? The https://github.com/mapserver/mapserver/blob/branch-7-2/CMakeLists.txt has |
Setting the policy is a workaround for this issue, not a proper solution. I've added a patch to the Debian package which sets the policy for the mapscript packages it builds to fix the build failure for the time being, see: https://salsa.debian.org/debian-gis-team/mapserver/commit/a039ff238258e7c3b9206b4a55d5d46eb4289dbd |
See #5646 Also standardise commands in lower-case
@sebastic - I've updated the Perl and Java CMakeLists to hopefully resolve this. Python has already been updated in master. Are you able to test this from the branch used in the pull request above? |
No easily, the changes from #5674 fail to apply on MapServer 7.2.1. |
After fixing the merge conflicts I get an error for the Java MapScript:
|
That was a bad merge on my end, after fixing it the configuration fails on Ruby MapScript which your PR hasn't updated yet:
|
Ruby MapScript updated also. |
Ruby install fails because
|
Good catch. I've updated the CMakeLists to match the Python approach which I can verify is working. I guess it would be good to get Ruby and Perl into one of the CI builds. |
Only the second is correct.
The same goes for Ruby MapScript:
|
The output files variable was including a full build folder. Updated to match previous output. |
Much better indeed with the changes from 612cc46. The Debian package build is now also pretty much identical to the first 7.2.1 build. |
@sebastic - are you happy with applying the pull request to master? |
Yes, the changes are good enough now. Although the new structure (not using |
Closed with #5674 |
This is a temporary solution to get CMake testing working again. With 20ce540 set: there were several variations of this error: ``` CMake Error at CMakeLists.txt:220 (get_target_property): The LOCATION property may not be read from target "shpcreate". Use the target name directly with add_custom_command, or use the generator expression $<TARGET_FILE>, as appropriate. ``` See MapServer/MapServer#5646
This is a temporary solution to get CMake testing working again. With 20ce540 set: there were several variations of this error: CMake Error at CMakeLists.txt:220 (get_target_property): The LOCATION property may not be read from target "shpcreate". Use the target name directly with add_custom_command, or use the generator expression $<TARGET_FILE>, as appropriate. See MapServer/MapServer#5646 Skipped getting Windows testing working
As reported by Santiago Vila in Debian Bug #906605, mapserver 7.2.0 fails to build in Debian unstable.
This seems to be caused by the upgrade to CMake 3.12 which turned some warnings into errors:
The text was updated successfully, but these errors were encountered: