Skip to content

Commit

Permalink
Trying to fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Aug 17, 2023
1 parent bfa540c commit 112ae1b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
env:
BACKEND_ARG: ${{ matrix.backend }}
shell: bash
run: cmake -Bbuild -DBUILD_EXAMPLES=ON $BACKEND_ARG
run: cmake -Bbuild $BACKEND_ARG

- name: Build
shell: bash
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(RTNeural-experimental VERSION 1.0.0)

get_directory_property(parent_dir PARENT_DIRECTORY)
if("${parent_dir}" STREQUAL "")
set(is_toplevel 1)
set(is_toplevel ON)
include(cmake/CPM.cmake)
option(RTNEURAL_EIGEN "Use Eigen library for vector operations" OFF)
option(RTNEURAL_XSIMD "Use xsimd library for vector operations" OFF)
Expand All @@ -15,7 +15,7 @@ if("${parent_dir}" STREQUAL "")
OPTIONS "RTNEURAL_EIGEN ${RTNEURAL_EIGEN}" "RTNEURAL_XSIMD ${RTNEURAL_XSIMD}" "RTNEURAL_STL ${RTNEURAL_STL}"
)
else()
set(is_toplevel 0)
set(is_toplevel OFF)
endif()

if(APPLE)
Expand All @@ -26,6 +26,6 @@ if(APPLE)
target_include_directories(RTNeural-accelerate INTERFACE include/RTNeural-accelerate)
endif()

if(is_toplevel)
if(${is_toplevel})
add_subdirectory(examples)
endif()
1 change: 1 addition & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ endfunction()
if(APPLE)
add_subdirectory(accelerate)
endif()
add_subdirectory(residual_connection)
1 change: 1 addition & 0 deletions examples/residual_connection/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
create_example(residual_connection)
3 changes: 3 additions & 0 deletions examples/residual_connection/residual_connection.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//
// Created by jatin on 8/17/23.
//

0 comments on commit 112ae1b

Please sign in to comment.