[Cmake] (no subject)

Bill Hoffman bill . hoffman at kitware . com
Tue, 19 Aug 2003 11:46:33 -0400


OK, AUX_SOURCE_DIRECTORY does not work with .cc, only .cxx, .C, .cpp.
The main reason is that .cc does not work with visual studio 6.
So, you can either use cmake 1.8.0 and the GLOB command instead of
AUX_SOURCE_DIRECTORY, or you can list out the sources in a SET command.

SET(SOURCES foo.cc bar.cc)

-Bill


At 11:39 AM 8/19/2003, Mónica Hernández Giménez wrote:
>OK guys, now I am at this point:
>
>I have another library that already compiles with cmake and does not need the external library. If I add this external library to its CMakeLists, in
>
>MESSAGE(STATUS "${LEVELSET_SOURCE_LIST}")
>
>the message is empty and if I dont add it I can see the list of sources. Now in the library I am trying to compile all of the *.cc have an include to a class of the external library. So including it or not in the result of the message is empty.
>
>Any idea of why it doesn't recognize my *.cc ???????
>
>The corrected code as follows
>
># Name of project
>
>        PROJECT (LEVELSET)
>
># Include directories (*.h)
>
>        INCLUDE_DIRECTORIES (${LEVELSET_SOURCE_DIR}/../include /extra/vit_local/packages/src/imperial/geometry++/include /extra/vit_local/packages/src/imperial/common++/include /extra/vit_local/packages/src/imperial/contrib++/include /extra/vit_local/packages/src/imperial/image++/include /extra/vit_local/packages/src/imperial/recipes/include)
>
># Source directories (*.cc)
>
>        AUX_SOURCE_DIRECTORY(${LEVELSET_SOURCE_DIR}/../src LEVELSET_SOURCE_LIST)
>
>         MESSAGE(STATUS "${LEVELSET_SOURCE_LIST}")
>
># Link to Daniels library
>
>        LINK_DIRECTORIES (/extra/vit_local/packages/src/imperial/lib/i686-pc-linux-gnu)
>
>        LINK_LIBRARIES(libgeometry libcommon libcontrib libpcontrib libimage librecipes)
>
>
># Building levelset library
>
>        SET(EXECUTABLE_OUTPUT_PATH ${LEVELSET_BINARY_DIR}/../bin)
>        SET(LIBRARY_OUTPUT_PATH ${LEVELSET_BINARY_DIR}/../lib)
>
>        ADD_LIBRARY(levelset_Gcc ${LEVELSET_SOURCE_LIST})
>
>
>
>------------------------------------------------------------------------------------------------------------------
>Mónica Hernández Giménez
>Departamento de Ingeniería Electrónica y Comunicaciones
>Lab. 3.05
>Centro Politécnico Superior. Universidad de Zaragoza
>Phone. (+34) 976 76 27 05
>Fax:    (+34) 976 76 21 11
>e-mail: mhg at unizar . es
>------------------------------------------------------------------------------------------------------------------
>
>
>
>
>
>
>
>
>_______________________________________________
>Cmake mailing list
>Cmake at www . cmake . org
>http://www . cmake . org/mailman/listinfo/cmake