[CMake] missing .S (assembly file) target
Reto Glauser
gentoo at blinkeye.ch
Wed Sep 21 02:23:39 EDT 2011
On Tue, 20 Sep 2011 19:11:58 +0200, Michael Hertling wrote:
> After configuring, "make help" reveals:
>
> % make help
> The following are some of the valid targets for this Makefile:
> ... all (the default if no target is provided)
> ... clean
> ... depend
> ... edit_cache
> ... main
> ... mainxx
> ... rebuild_cache
> ... main.o
> ... main.i
> ... main.s
> ... mainxx.o
> ... mainxx.i
> ... mainxx.s
>
> A "make main.s mainxx.s" results in:
>
> % make main.s mainxx.s
> ...
> Compiling C source to assembly CMakeFiles/main.dir/main.c.s
> .../gcc -S .../main.c -o CMakeFiles/main.dir/main.c.s
> ...
> Compiling CXX source to assembly CMakeFiles/mainxx.dir/mainxx.cxx.s
> .../c++ -S .../mainxx.cxx -o CMakeFiles/mainxx.dir/mainxx.cxx.s
>
> % ls CMakeFiles/main{,xx}.dir/*.s
> CMakeFiles/main.dir/main.c.s CMakeFiles/mainxx.dir/mainxx.cxx.s
>
> Don't the *.s files appear as targets in your CMake-generated
> Makefiles, or aren't they the files you are interested in?
>
> Regards,
>
> Michael
Thank you for providing the example, this works as expected. If one
uses subdirectories for source files, one doesn't see the assembly
target in the top-directory. To see the assembly targets, you have to cd
into the subdirectory of the build.
More information about the CMake
mailing list