Added simple cmake script to build the project#1
Added simple cmake script to build the project#1dkargin wants to merge 1 commit intospthm:masterfrom
Conversation
spthm
left a comment
There was a problem hiding this comment.
Hi @dkargin, thanks for opening this PR.
I am not very familiar with cmake, and currently do not have access to a machine to test these build changes; however, it looks to me like there are a few differences between this and the behaviour of the original Makefiles (see comments on CMakeLists.txt).
| add_executable(cmem cmem.cu) | ||
| add_executable(diverge diverge.cu diverge2.cu diverge3.cu path.cu) | ||
| add_executable(global global.cu) | ||
| add_executable(icache icache.cu icache_kernels1.cu icache_kernels2.cu icache_kernels3.cu icache_kernels4.cu) |
There was a problem hiding this comment.
In the original Makefiles, this executable is built as icache1.
The Makefiles also build icache2, icache3 and icache4.
| enable_language(CUDA) | ||
|
|
||
| add_executable(cmem cmem.cu) | ||
| add_executable(diverge diverge.cu diverge2.cu diverge3.cu path.cu) |
There was a problem hiding this comment.
The Makefile-diverge compiles diverge2.cu to diverge2.cu_sm_12_o with -arch sm_12 (because it is listed as CUFILES_sm_12=diverge2.cu). Similar arch-specific compiles happen with other targets.
I do not think that behaviour is reproduced here?
Project can be built with modern CMake