Re: [CMake] Cannot add target-level dependencies to non-existent target

2015-07-03 Thread Glenn Coombs
I've not come across the target_sources command before - is it new in 3.1.3 ? From reading the documentation it looks like it allows one to add sources to a target *after* the target has been created via add_library or add_executable. If that is true then that could be a very useful command. I wi

Re: [CMake] Cannot add target-level dependencies to non-existent target

2015-06-30 Thread Stephen Kelly
Glenn Coombs wrote: > I am getting the error in the subject. The code I have looks like this: > > if (PRE_COMPILED_HEADERS_FOUND) > ADD_PRECOMPILED_HEADER(${header_pch} ${source_pch} sources > systemc) > endif() > > add_library(systemc ${sources} ${sources_no_pch} ${

Re: [CMake] Cannot add target-level dependencies to non-existent target

2015-06-30 Thread Parag Chandra
gt; Reply-To: "glenn.coo...@gmail.com<mailto:glenn.coo...@gmail.com>" mailto:glenn.coo...@gmail.com>> Date: Tuesday, June 30, 2015 at 9:16 AM To: cmake Mailing List mailto:cmake@cmake.org>> Subject: [CMake] Cannot add target-level dependencies to non-existent target I a

[CMake] Cannot add target-level dependencies to non-existent target

2015-06-30 Thread Glenn Coombs
I am getting the error in the subject. The code I have looks like this: if (PRE_COMPILED_HEADERS_FOUND) ADD_PRECOMPILED_HEADER(${header_pch} ${source_pch} sources systemc) endif() add_library(systemc ${sources} ${sources_no_pch} ${headers}) where the call to add_dependency i