Re: [CMake] Difference in CMake 2.8 / 3.1+ behaviour when looking at SOURCES property

2015-07-21 Thread Brad King
On 07/20/2015 03:45 PM, Berteun Damman wrote: > Note that it displays the full path for foo.txt! With later CMake > versions (3.1 and up is my suspicion), it will display: > > build$ cmake .. > foo.cc > foo.txt > > I tried looking trough the release notes, and I've found that > add_library gained

[CMake] Difference in CMake 2.8 / 3.1+ behaviour when looking at SOURCES property

2015-07-20 Thread Berteun Damman
Hi, Consider the following example make file (it assumes a foo.txt and foo.cc -- can be both empty) are present: cmake_minimum_required(VERSION 2.8.12) add_library(lib_example STATIC "foo.cc" "foo.txt") get_target_property(sources lib_example SOURCES) foreach(source ${sources}) MESSAGE("${so