diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 563b6fc3..fbbd1be1 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -20,9 +20,6 @@ set(examples black_scholes print_styles) - - - add_library(example_lib INTERFACE) target_include_directories(example_lib SYSTEM INTERFACE ${CUTLASS_INC} ${pybind11_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS}) @@ -54,6 +51,21 @@ foreach( example ${examples} ) target_link_libraries(${example} example_lib) endforeach() +# Compile all examples with CUDASTF and append their name with _stf +foreach( example ${examples} ) + string( CONCAT file ${example} ".cu" ) + + set(output_name "${example}_stf") + add_executable( ${output_name} ${file} ) + + # Add the -DUSE_STF compilation flag + target_compile_definitions(${output_name} PRIVATE USE_STF) + + target_link_libraries(${output_name} example_lib) +endforeach() + + + # Build proprietary examples file (GLOB_RECURSE proprietary_sources CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/proprietary/*/examples/*.cu) foreach (pexample ${proprietary_sources}) diff --git a/examples/simple_radar_pipeline.h b/examples/simple_radar_pipeline.h index 7aea6c8d..4ef3f590 100644 --- a/examples/simple_radar_pipeline.h +++ b/examples/simple_radar_pipeline.h @@ -35,10 +35,6 @@ #include #include -#ifndef USE_STF -#define USE_STF 1 -#endif - using namespace matx; /**