Hello, 

I have the following script: 
================================= 


file(GLOB_RECURSE statphys "*.cpp") 




#add_library(simol-statphys SHARED ${statphys}) 
add_executable(simol-statphys ${statphys}) 




add_dependencies(simol-statphys simol-core) 


add_custom_target(statphys simol-statphys) 




target_link_libraries(simol-statphys simol-core) 

target_link_libraries(simol-statphys 
${ARMADILLO_INSTALL_DIR}/lib/libarmadillo.so) 
target_link_libraries(simol-statphys ${YAMLCPP_INSTALL_DIR}/lib/libyaml-cpp.a) 

================================= 




I would like generate a shared library simol-statphys instead of an executable 
simol-statphys. 

In other words, I would like to replace the call to add_executable, to the one 
which is contained in the comment below this call. 




However, if I do this, and I type 




make statphys 




I get the following error message: 




Scanning dependencies of target statphys 
/bin/sh: 1: simol-statphys: not found 
make[3]: *** [src/modules/statphys/CMakeFiles/statphys] Erreur 127 
make[2]: *** [src/modules/statphys/CMakeFiles/statphys.dir/all] Erreur 2 
make[1]: *** [src/modules/statphys/CMakeFiles/statphys.dir/rule] Erreur 2 
make: *** [statphys] Erreur 2 




Does someone can explain me where do the problem come from? 




Cédric 

-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to