cmake + cpp file + c file + subdir

Brad King brad.king at kitware.com
Wed Mar 15 15:40:21 CET 2006


Laurent Montel wrote:
> Hi,
> I have a problem:
> I have a card.cpp and card.c into subdir
> and cmake said me that it's the same:
> (kdegames/kpat)
> set(libfcs_SRCS
>     ${CMAKE_SOURCE_DIR}/kpat/freecell-solver/alloc.c
>     ${CMAKE_SOURCE_DIR}/kpat/freecell-solver/app_str.c
>     ${CMAKE_SOURCE_DIR}/kpat/freecell-solver/caas.c
>     ${CMAKE_SOURCE_DIR}/kpat/freecell-solver/card.c
>     ${CMAKE_SOURCE_DIR}/kpat/freecell-solver/cl_chop.c
>     ${CMAKE_SOURCE_DIR}/kpat/freecell-solver/cmd_line.c
>     ${CMAKE_SOURCE_DIR}/kpat/freecell-solver/fcs_dm.c
>     ${CMAKE_SOURCE_DIR}/kpat/freecell-solver/fcs_hash.c
>     ${CMAKE_SOURCE_DIR}/kpat/freecell-solver/fcs_isa.c
>     ${CMAKE_SOURCE_DIR}/kpat/freecell-solver/freecell.c
> ...
> )
> 
> set(kpat_SRCS ${libfcs_SRCS}
>    main.cpp
>    cardmaps.cpp
>    card.cpp
>    dealer.cpp
>    pwidget.cpp
>    pile.cpp
>    deck.cpp
>    pile_algorithms.cpp
>    kings.cpp
>    freecell.cpp
> ...
> )
> and cmake said me:
> Warning: Source file "card.cpp" is listed multiple times for target "kpat".
> Warning: Source file "freecell.cpp" is listed multiple times for target 
> "kpat".

This should be fixed in CVS CMake.  If you are able, please try it to 
make sure it works before we do the next KDE CMake release.

Thanks,
-Brad


More information about the Kde-buildsystem mailing list