File tree 3 files changed +40
-0
lines changed
3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ cmake_minimum_required ( VERSION 2.6 )
2
+ project ( algorithm )
3
+
4
+ include_directories ( "include" )
5
+ include_directories ( "." )
6
+ if ( MSVC )
7
+ include_directories ( "msvc" )
8
+ endif ()
9
+
10
+ #add_executable(word_seg "src/word_seg_demo.cpp")
11
+ #add_executable(astar "src/astar_demo.cpp")
12
+
13
+ file ( GLOB APP_SOURCES src/*.cpp )
14
+ SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FI\" msvc/alg_vs.h\" " )
15
+ message ( ${CMAKE_CXX_FLAGS} )
16
+ foreach ( appsourcefile ${APP_SOURCES} )
17
+ get_filename_component ( demo_name ${appsourcefile} NAME_WE )
18
+ add_executable ( ${demo_name} ${appsourcefile} )
19
+ endforeach ( appsourcefile ${APP_SOURCES} )
Original file line number Diff line number Diff line change
1
+ #ifndef __ALGVS_H__
2
+ #define __ALGVS_H__
3
+ #ifdef _MSC_VER
4
+
5
+ #define _CRT_SECURE_NO_WARNINGS
6
+
7
+ #define __func__ __FUNCTION__
8
+
9
+ #define strtok_r strtok_s
10
+
11
+ #if _MSC_VER <= 1700
12
+ #define ALG_VLA_NOT_SUPPORTED 1
13
+ #endif
14
+
15
+ #define typeof decltype
16
+
17
+ #endif //_MSC_VER
18
+ #endif //__ALGVS_H__
Original file line number Diff line number Diff line change
1
+ #ifdef _MSC_VER
2
+
3
+ #endif
You can’t perform that action at this time.
0 commit comments