-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move boids bruteforce output kernel to rtc_repro example
- Loading branch information
Showing
3 changed files
with
1,153 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Minimum CMake version 3.18 for CUDA --std=c++17 | ||
cmake_minimum_required(VERSION 3.18...3.25 FATAL_ERROR) | ||
|
||
# Set the location of the ROOT flame gpu project relative to this CMakeList.txt | ||
get_filename_component(FLAMEGPU_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../.. REALPATH) | ||
|
||
# Handle CMAKE_CUDA_ARCHITECTURES gracefully | ||
include(${FLAMEGPU_ROOT}/cmake/CUDAArchitectures.cmake) | ||
flamegpu_init_cuda_architectures(PROJECT rtc_repro) | ||
|
||
# Name the project and enable required languages | ||
project(rtc_repro CXX CUDA) | ||
|
||
# Include common rules. | ||
include(${FLAMEGPU_ROOT}/cmake/common.cmake) | ||
|
||
# Define output location of binary files | ||
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/) | ||
|
||
# Prepare list of source files | ||
# Can't do this automatically, as CMake wouldn't know when to regen (as CMakeLists.txt would be unchanged) | ||
SET(ALL_SRC | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/main.cu | ||
) | ||
|
||
# Add the executable and set required flags for the target | ||
flamegpu_add_executable("${PROJECT_NAME}" "${ALL_SRC}" "${FLAMEGPU_ROOT}" "${PROJECT_BINARY_DIR}" TRUE) | ||
|
||
# Also set as startup project (if top level project) | ||
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" PROPERTY VS_STARTUP_PROJECT "${PROJECT_NAME}") | ||
|
||
# Set the default (visual studio) debugger configure_file | ||
set_target_properties("${PROJECT_NAME}" PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" | ||
VS_DEBUGGER_COMMAND_ARGUMENTS "-i 0.xml -s 200") |
Oops, something went wrong.