[Cmake] Out of source build

Bill Hoffman bill . hoffman at kitware . com
Fri, 11 Jul 2003 15:05:03 -0400


Can you provide some more information?

Those two files should be the same.
Neither of them should produce in-source or out-of-source
builds.  That is determined by how cmake is run on the files.

-Bill


At 02:45 PM 7/11/2003, Zennard Sun wrote:
>Hi Andy,
>   Thank you for all of your help so far.   I have yet another question relating to your previous solution.  I have A.cc B.cc and C.cc all in home/z/libFrame.  I wanted to make an out-of-source build like in your example so I created a seperate directory called home/z/lib-Sol.  I've tried the following in the CMakeLists.txt in lib-Sol:
>
>AUX_SOURCE_DIRECTORY(home/z/libFrame LIB_SOURCE_FILES) ADD_LIBRARY(foo STATIC LIB_SOURCE_FILES)
>
>versus:
>
>ADD_LIBRARY(foo home/z/libFrame/A.cc home/z/libFrame/B.cc home/z/libFrame/C.cc)
>
>The first solution does not give me an out of source build.  The object files are produced in libFrame rather than in lib-Sol.  The second solution gives me the correct out of source build and creates the object files in libFrame.  Since the sources in that directory may change, I would like to use the first solution.  Do you have any ideas?
>
>
>Thanks,
>Zennard Sun
>
>_______________________________________________
>Cmake mailing list
>Cmake at cmake . org
>http://www . cmake . org/mailman/listinfo/cmake