File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ add_subdirectory(data_structures)
42
42
add_subdirectory (machine_learning )
43
43
add_subdirectory (numerical_methods )
44
44
add_subdirectory (graph )
45
+ add_subdirectory (divide_and_conquer )
45
46
46
47
cmake_policy (SET CMP0054 NEW )
47
48
cmake_policy (SET CMP0057 NEW )
Original file line number Diff line number Diff line change
1
+ # If necessary, use the RELATIVE flag, otherwise each source file may be listed
2
+ # with full pathname. RELATIVE may makes it easier to extract an executable name
3
+ # automatically.
4
+ file ( GLOB APP_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp )
5
+ # file( GLOB APP_SOURCES ${CMAKE_SOURCE_DIR}/*.c )
6
+ # AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} APP_SOURCES)
7
+ foreach ( testsourcefile ${APP_SOURCES} )
8
+ # I used a simple string replace, to cut off .cpp.
9
+ string ( REPLACE ".cpp" "" testname ${testsourcefile} )
10
+ add_executable ( ${testname} ${testsourcefile} )
11
+
12
+ set_target_properties (${testname} PROPERTIES LINKER_LANGUAGE CXX )
13
+ if (OpenMP_CXX_FOUND )
14
+ target_link_libraries (${testname} OpenMP::OpenMP_CXX )
15
+ endif ()
16
+ install (TARGETS ${testname} DESTINATION "bin/divide_and_conquer" )
17
+
18
+ endforeach ( testsourcefile ${APP_SOURCES} )
You can’t perform that action at this time.
0 commit comments