Skip to content

Commit

Permalink
update CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaffaljidhmah2 committed Mar 21, 2019
1 parent 3317e35 commit 202009d
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 11 deletions.
15 changes: 15 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.2)

PROJECT(ts)

INCLUDE_DIRECTORIES(
include
)

AUX_SOURCE_DIRECTORY(src DIR_SRCS)

SET(TMP
${DIR_SRCS}
)

ADD_EXECUTABLE(${PROJECT_NAME} ${TMP})
2 changes: 1 addition & 1 deletion variable.cpp → include/tensor.tpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "variable.hpp"
#include "variable.h"

namespace dlframework{

Expand Down
2 changes: 2 additions & 0 deletions variable.hpp → include/variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ namespace dlframework{

}// end dlframework

#include <tensor.tpp>

#endif
13 changes: 13 additions & 0 deletions src/test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include "variable.h"
#include <iostream>

using namespace std;
using namespace dlframework;

int main()
{
Tensor<int> a({2,3,5});
cout<<a.dim<<endl;
cout<<a({1,2,3})<<endl;

}
10 changes: 0 additions & 10 deletions test.cpp

This file was deleted.

0 comments on commit 202009d

Please sign in to comment.