Re: [CMake] Compiling object files.

2013-04-03 Thread landa
Hello Daniel,

I'm also starting with CMake and I had a problem to link an object to my
project. I will describe you what I did because it works for me but keep in
mind that maybe there is a better way.

First, you can compile object files with the command execute_process:

 execute_process(
   COMMAND
   $(FC) $(FFLAGS) $(FFLAGS_GENERAL) $(F90FLAGS) -o
cparam.lib -c cparam.f90
   )

Note that it is not cparam.o but cparam.lib.

Then you can link it to your project as a library with the command
target_link_libraries:

 target_link_libraries(
your_project
cparam.lib
)

Hope it can help you.
Damien



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Compiling-object-files-tp7583910p7583911.html
Sent from the CMake mailing list archive at Nabble.com.
--

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


[CMake] Configure custom build rule to use cuda runtime API build rule

2013-03-22 Thread landa
Hi all,

I have a visual studio solution created by a cmake file and I need to modify
one project custom build rule  to use the CUDA Runtime API Build Rule.
If someone knows how I can set the custom build rule directly from my cmake
file it will be very helpful. In other words, I want to do :

right click on the project - custom build rules... - check CUDA Runtime
API Build Rule

automatically with my cmake file.

I hope someone can help me.
Thanks



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Configure-custom-build-rule-to-use-cuda-runtime-API-build-rule-tp7583775.html
Sent from the CMake mailing list archive at Nabble.com.
--

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


[CMake] use add_executable AND cuda_add_executable

2013-03-19 Thread landa
Dear all,

I'm working on a visual studio project that is developed in c++ and I have
to integrate a new module developed in cuda. There is an existing cmake file
that I need to update but the problem is that it uses the command
ADD_EXECUTABLE for all *.cpp files and I need to use CUDA_ADD_EXECUTABLE
for my *.cu files. There is a way to use both of them in the same cmake
file? I found a patch for CMAKE to add native cuda support
(http://www.cmake.org/Bug/print_bug_page.php?bug_id=11887). Someone already
used it?

Thanks for your help.



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/use-add-executable-AND-cuda-add-executable-tp7583730.html
Sent from the CMake mailing list archive at Nabble.com.
--

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