File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 2
2
# with full pathname. RELATIVE may makes it easier to extract an executable name
3
3
# automatically.
4
4
file ( GLOB APP_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp )
5
-
6
-
5
+ # file( GLOB APP_SOURCES ${CMAKE_SOURCE_DIR}/*.c )
6
+ # AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} APP_SOURCES)
7
7
foreach ( testsourcefile ${APP_SOURCES} )
8
- # remove cpp from filename
8
+ # I used a simple string replace, to cut off .cpp.
9
9
string ( REPLACE ".cpp" "" testname ${testsourcefile} )
10
10
add_executable ( ${testname} ${testsourcefile} )
11
11
12
12
set_target_properties (${testname} PROPERTIES LINKER_LANGUAGE CXX)
13
-
14
- # add test with the same name as file name
15
- add_test (NAME ${testname} COMMAND ${testname} )
16
-
17
13
if (OpenMP_CXX_FOUND)
18
14
target_link_libraries (${testname} OpenMP::OpenMP_CXX)
19
15
endif ()
You can’t perform that action at this time.
0 commit comments