File tree 11 files changed +44
-4
lines changed
11 files changed +44
-4
lines changed Original file line number Diff line number Diff line change 3
3
Good examples: < https://github.com/ttroy50/cmake-examples >
4
4
5
5
1 . [ multi_executable] ( multi_executable/ )
6
+ 1 . [ multi_file] ( multi_file/ )
7
+ 1 . [ multi_file_recursive] ( multi_file_recursive/ )
6
8
1 . [ shared_lib_external] ( shared_lib_external/ )
7
9
8
10
Make alternative that aims to be portable.
Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 3.0)
2
- file (GLOB APP_SOURCES RELATIVE ${CMAKE_SOURCE_DIR} "*.c" )
3
- message ("${APP_SOURCES} " )
4
- foreach (testsourcefile ${APP_SOURCES} )
2
+ file (GLOB SOURCES RELATIVE ${CMAKE_SOURCE_DIR} "*.c" )
3
+ foreach (testsourcefile ${SOURCES} )
5
4
string (REPLACE ".c" "" testname ${testsourcefile} )
6
5
add_executable (${testname} ${testsourcefile} )
7
- endforeach (testsourcefile ${APP_SOURCES } )
6
+ endforeach (testsourcefile ${SOURCES } )
Original file line number Diff line number Diff line change
1
+ cmake_minimum_required (VERSION 3.0)
2
+ file (GLOB SOURCES RELATIVE ${CMAKE_SOURCE_DIR} "*.c" )
3
+ add_executable (main ${SOURCES} )
Original file line number Diff line number Diff line change
1
+ #include "a.h"
2
+
3
+ int a (void ) { return 42 ; }
Original file line number Diff line number Diff line change
1
+ #ifndef A_H
2
+ #define A_H
3
+ int a (void );
4
+ #endif
Original file line number Diff line number Diff line change
1
+ #include <stdio.h>
2
+ #include <stdlib.h>
3
+
4
+ #include "a.h"
5
+
6
+ int main (void ) {
7
+ printf ("%d\n" , a ());
8
+ return EXIT_SUCCESS ;
9
+ }
Original file line number Diff line number Diff line change
1
+ cmake_minimum_required (VERSION 3.0)
2
+ file (GLOB_RECURSE SOURCES RELATIVE ${CMAKE_SOURCE_DIR} "src/*.c" )
3
+ add_executable (main ${SOURCES} )
Original file line number Diff line number Diff line change
1
+ #include "a.h"
2
+
3
+ int a (void ) { return 42 ; }
Original file line number Diff line number Diff line change
1
+ #ifndef A_H
2
+ #define A_H
3
+ int a (void );
4
+ #endif
Original file line number Diff line number Diff line change
1
+ #include <stdio.h>
2
+ #include <stdlib.h>
3
+
4
+ #include "d/a.h"
5
+
6
+ int main (void ) {
7
+ printf ("%d\n" , a ());
8
+ return EXIT_SUCCESS ;
9
+ }
Original file line number Diff line number Diff line change 11
11
1 . [ Animation random walk] ( animation_random_walk.c )
12
12
1 . [ Animation user control] ( animation_user_control.c )
13
13
1 . [ Animation user control discrete] ( animation_user_control_discrete.c )
14
+ 1 . [ Animation user control inertia] ( animation_user_control_inertia.c )
14
15
1 . [ Two player discrete] ( two_player_discrete.c )
15
16
1 . [ Two player discrete sync] ( two_player_discrete_sync.c )
16
17
1 . Plots
You can’t perform that action at this time.
0 commit comments