I'm trying to compile both static and shared libraries and would like
to do it only once. I tried following the instructions at the
vtk.org/Wiki but it seems to have an error:

 IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC)
   ADD_LIBRARY(zzSTATIC STATIC -fPIC)
   ADD_LIBRARY(zzDYNAMIC SHARED)
   TARGET_LINK_LIBRARIES(zzDYNAMIC -Wl,-whole-archive zzSTATIC
-Wl,-no-whole-archive)
 ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC)

The 'ADD_LIBRARY(zzSTATIC STATIC -fPIC)' doesn't seem correct to me
(since according to the documentation you can't add compile flags
there and it's also missing a list of source files). In addition I
haven't figured out how to set the compile flags specifically for that
library.

Is it possible to see the actual gcc/g++ commands that cmake uses? I
can't find a log of them anywhere.

Thanks,

Shaun
_______________________________________________
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