Clifford Yapp wrote: > With David's patch and the above SOURCE_DIR property, it looks like > the necessary pieces are now present for target + source processing.
That might happen to work for brlcad, but it is not really true. CMake looks in the source dir for relative files listed in targets, then the binary dir, then it tries a number of language-specific extensions in each of the source and binary directories. And it does that at generate-time after evaluating generator expressions. And the file extensions it uses as candidates are determined by cmake variables that the user can modify. http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmSourceFile.cxx;h=86f0a7a8;hb=HEAD#l138 So, your cmake function will fail on a target like add_executable(hello # main.cpp exists main # Exists in source dir foo.cpp # Exists in build dir generated_file.cpp # bar.c exists in source dir bar # another_generated_file.h exists in build dir another_generated_file # determined_at_generate_time.cpp exists in source dir $<1:determined_at_generate_time> ) Why not add a generator expression like $<TARGET_SOURCES:tgt> and use that instead? You can implement/define that as creating absolute paths. Thanks, Steve. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers