MantisBT - CMake
View Issue Details
0013200CMakeCMakepublic2012-05-08 10:402016-06-10 14:31
Mathieu Malaterre 
Kitware Robot 
normalminorhave not tried
closedmoved 
CMake 2.8.8 
 
0013200: Invalid make syntax generated with ; in target VERSION property
Steps to reproduce:

$ echo "int bla() { return 0;}" > bla.c
$ cat CMakeLists.txt

cmake_minimum_required(VERSION 2.8)
project(test2 C)

SET(LIB_PROPERTIES
  VERSION "1.0"
  SOVERSION "1"
)

add_library(lib2 SHARED bla.c)
set_property(TARGET lib2 PROPERTY ${LIB_PROPERTIES})

then simply run cmake && make

It would be nice if cmake would trigger a warning on the improper syntax:


set_property(TARGET lib2 PROPERTY ${LIB_PROPERTIES})


Thanks
No tags attached.
Issue History
2012-05-08 10:40Mathieu MalaterreNew Issue
2012-05-08 10:40Mathieu MalaterreCategory(No Category) => CMake
2012-05-08 10:40Mathieu MalaterreDescription Updatedbug_revision_view_page.php?rev_id=641#r641
2012-05-08 10:46Brad KingNote Added: 0029421
2012-05-08 10:46Brad KingStatusnew => backlog
2012-05-08 10:46Brad KingProduct Version => CMake 2.8.8
2012-05-08 10:46Brad KingSummaryCMakeFiles/lib2.dir/build.make:82: *** missing separator => Invalid make syntax generated with ; in target VERSION property
2016-06-10 14:28Kitware RobotNote Added: 0042043
2016-06-10 14:28Kitware RobotStatusbacklog => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0029421)
Brad King   
2012-05-08 10:46   
The set_property command cannot warn. The call

 set_property(TARGET lib2 PROPERTY VERSION "1.0" SOVERSION "1")

is a perfectly valid way to set the "VERSION" property to "1.0;SOVERSION;1".

Perhaps instead the generator could disallow ';' and perhaps other characters in the VERSION and SOVERSION values. We can't simply validate them as numbers because the versions can be arbitrary strings.

(0042043)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.