Package: cmake

CMake seems to assumes that `gcc` calls the C compiler while `g++`
calls the C++ compiler. Well this is not entirely true:

$ cat foo.C
int bar() { return 42; }

$ gcc -o foo.o -c foo.C
$ nm foo.o
0000000000000000 T _Z3barv
                 U __gxx_personality_v0

Compared to:

$ gcc -x c -o foo.o -c foo.C
$ nm foo.o
0000000000000000 T bar

Which means that the following CMake code is not working (at least on
debian+gcc compiler because of implicit gcc behavior treating capital
C file extension):

$ cat CMakeLists.txt
project(t)
add_library(foo foo.C)
set_source_files_properties(foo.C PROPERTIES LANGUAGE C)
set_target_properties(foo PROPERTIES LINKER_LANGUAGE C)


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to