File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 7
7
# Licence: 3-Clause BSD licence
8
8
#############################################################################
9
9
10
- PROJECT (TEDemo )
10
+ project (TEDemo )
11
11
12
- CMAKE_MINIMUM_REQUIRED (VERSION 3.12 )
13
- SET (CMAKE_CXX_STANDARD 17 )
14
- SET (CMAKE_CXX_STANDARD_REQUIRED True )
12
+ cmake_minimum_required (VERSION 3.12 )
13
+ set (CMAKE_CXX_STANDARD 17 )
14
+ set (CMAKE_CXX_STANDARD_REQUIRED True )
15
15
16
- SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR} /bin )
17
-
18
- ADD_EXECUTABLE (${CMAKE_PROJECT_NAME} tinyexpr.cpp tedemo.cpp )
16
+ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR} /bin )
19
17
18
+ add_executable (${CMAKE_PROJECT_NAME} ../../tinyexpr.cpp tedemo.cpp )
Original file line number Diff line number Diff line change 1
1
// This is mostly used as a CMake project used for code analysis.
2
2
3
- #include " tinyexpr.h"
3
+ #include " ../../ tinyexpr.h"
4
4
#include < iostream>
5
5
6
- int main (int argc, char * argv[])
6
+ int main (int argc, char * argv[])
7
7
{
8
8
te_parser tep;
9
- const char * c = " sqrt(5^2+7^2+11^2+(8-2)^2)" ;
9
+ const char * c = " sqrt(5^2+7^2+11^2+(8-2)^2)" ;
10
10
double r = tep.evaluate (c);
11
- std::cout << " The expression:\n\t " <<
12
- c << " \n evaluates to:\n\t " << r << " \n " ;
11
+ std::cout << " The expression:\n\t " << c << " \n evaluates to:\n\t " << r << " \n " ;
13
12
return EXIT_SUCCESS;
14
13
}
You can’t perform that action at this time.
0 commit comments