Skip to content

Added simple cmake script to build the project#1

Open
dkargin wants to merge 1 commit intospthm:masterfrom
dkargin:cmake_build
Open

Added simple cmake script to build the project#1
dkargin wants to merge 1 commit intospthm:masterfrom
dkargin:cmake_build

Conversation

@dkargin
Copy link

@dkargin dkargin commented May 29, 2023

Project can be built with modern CMake

Copy link
Owner

@spthm spthm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants