[Cmake] SOURCE_FILES deprecation

Amitha Perera perera at cs.rpi.edu
Mon Apr 22 15:43:08 EDT 2002


Thanks for the reply, Ken.

It turns out I was jumping the gun: CMake itself failed to build
because the CMakeLists.txt in the Curses dialog hadn't been
updated. It failed noisily, saying that SOURCE_FILES had been
deprecated, and I assumed that vxl build would similarly fail. It
doesn't, however. vxl doesn't have a CMAKE_REQUIRED_VERSION (I didn't
even know it existed!), so everything works well.

I apologise for the false alarm.

On this topic, is there a recommended way to introduce new commands
(like SET_SOURCE_FILES_PROPERTIES) without breaking builds with older
versions of CMake?

Cheers,
Amitha.


On Mon, Apr 22, 2002 at 03:31:18PM -0400, Ken Martin wrote:
> Hello Amitha,
> 
> 
> These commands are not really deprecated. We plan to support them for
> a long time to come. But... Here is how it is supposed to work. If you
> say that your CMakeList files require CMake version > 1.2 (using the
> CMakeRequiredVersion command) then SOURCE_FILES is not a valid command
> (since you've specified that CMake 1.2 can't be used anyhow, we don;t
> want you using the old style commands). Otherwise they should still be
> allowed. So somewhere there must be a CMAKE_REQUIRED_VERSION command
> that is causing the errors to show up. The only problem I can see is
> that maybe vxl doesn't requires CMake > 1.2 but it is being included
> within a project (maybe Insight etc) that does require CMake > 1.2. In
> that case something like
> 
> IF (COMMAND CMAKE_REQUIRES_VERSION)
>   CMAKE_REQUIRES_VERSION( VERSION 1.2)
> ENDIF (COMMAND CMAKE_REQUIRES_VERSION)
> 
> at the beginning of the vxl CMakeLists.txt file should do the job. Let
> me know if that is the case or if something else if happening.
> 
> Thanks
> Ken



More information about the CMake mailing list