2010/7/21 sheissj <shei...@gmail.com>:
> Hello.
>
> I want to generate a simple Makefile from cmake.
> This Makefile looks like this:
>
> all:
>     @echo "No build"
>
> tags:
>     ctags -R *.cpp
>     cscope -b -q -k *.cpp
>
>
> This simple Makefile do not have target to build source code. It is only for
> building ctags index and cscope db.
> So it is not a matter whether c/c++ compiler exists or not.
>
> How can I write CMakeList.txt for this simple work?
>
> One problem is... when "cmake ." command is run, some errors are occured
> like "The C compiler identification is unknown" and "The C++ compiler
> identification is unknown" and blar blar because I use cygwin and gcc/g++ is
> not installed.
> How to skip checking compiler detection?

at the top of your CMakeLists.txt you should have something like:

PROJECT(MakeTags NONE)

This will prevent CMake from enabling the default C and CXX languages.

then your "tags" target may be done with
add_custom_target.

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to