-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUGFIX: add ARB_CUDA flag to example catalogue (#2039)
fix ornstein_uhlenbeck example on gpu: - use make_catalogue instead of make_catalogue_standalone - link to arbor-private-deps - mark all files as c++ sources when using cuda-clang or hip-clang
- Loading branch information
Showing
3 changed files
with
19 additions
and
43 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
make_catalogue_standalone( | ||
NAME ou | ||
SOURCES "${CMAKE_CURRENT_SOURCE_DIR}" | ||
MOD ornstein_uhlenbeck | ||
CXX | ||
CXX_FLAGS_TARGET ${ARB_CXX_FLAGS_TARGET_FULL} | ||
VERBOSE ON) | ||
include(${PROJECT_SOURCE_DIR}/mechanisms/BuildModules.cmake) | ||
|
||
add_executable(ou EXCLUDE_FROM_ALL ou.cpp) | ||
add_dependencies(ou ou-catalogue) | ||
target_compile_options(ou PRIVATE ${ARB_CXX_FLAGS_TARGET_FULL}) | ||
target_include_directories(ou PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/generated/ou") | ||
make_catalogue( | ||
NAME ornstein_uhlenbeck | ||
MOD ornstein_uhlenbeck | ||
VERBOSE ${ARB_CAT_VERBOSE} | ||
ADD_DEPS OFF) | ||
|
||
target_link_libraries(ou PRIVATE arbor arborio ou-catalogue) | ||
add_executable(ou EXCLUDE_FROM_ALL ou.cpp ${catalogue-ornstein_uhlenbeck-mechanisms}) | ||
add_dependencies(ou catalogue-ornstein_uhlenbeck-target) | ||
|
||
if(ARB_WITH_CUDA_CLANG OR ARB_WITH_HIP_CLANG) | ||
set_source_files_properties(${catalogue-ornstein_uhlenbeck-meachanisms} PROPERTIES LANGUAGE CXX) | ||
endif() | ||
target_include_directories(ou PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/generated/ornstein_uhlenbeck") | ||
|
||
target_link_libraries(ou PRIVATE arbor-private-deps) # compiler flags, GPU options etc | ||
target_link_libraries(ou PRIVATE arbor arborio) | ||
if (ARB_USE_BUNDLED_FMT) | ||
target_include_directories(ou PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../../ext/fmt/include") | ||
target_compile_definitions(ou PRIVATE FMT_HEADER_ONLY) | ||
else() | ||
find_package(fmt REQUIRED) | ||
target_link_libraries(ou PRIVATE fmt::fmt-header-only) | ||
endif() | ||
|
||
add_dependencies(examples ou) |
File renamed without changes.
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