function(set_nana_test dir files)
This commit is contained in:
@@ -351,27 +351,23 @@ if (NANA_CMAKE_BUILD_DEMOS)
|
|||||||
endif (NANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS)
|
endif (NANA_CMAKE_INCLUDE_EXPERIMENTAL_DEMOS)
|
||||||
# Pending: FreeMe (added but really completely compiled if defined BUILD_FreeMe )
|
# Pending: FreeMe (added but really completely compiled if defined BUILD_FreeMe )
|
||||||
|
|
||||||
set (tests)
|
function(set_nana_test dir files)
|
||||||
foreach (demo ${demos})
|
foreach ( test ${files})
|
||||||
set(tests ${tests} ${demos_dir}${demo})
|
add_executable(${test} "${dir}${test}.cpp")
|
||||||
endforeach( demo ${demos})
|
set_property( TARGET ${test} PROPERTY CXX_STANDARD 14 )
|
||||||
foreach (example ${examples})
|
target_link_libraries(${test} ${PROJECT_NAME})
|
||||||
set(tests ${tests} ${examples_dir}${example})
|
#if(NANA_CMAKE_AUTOMATIC_GUI_TESTING)
|
||||||
endforeach(example ${examples})
|
#add_custom_command( TARGET ${test} POST_BUILD COMMAND ${test} )
|
||||||
|
#add_custom_target(do_always_${test} ALL COMMAND ${test})
|
||||||
|
#add_test(${test} COMMAND ${test})
|
||||||
|
#endif(NANA_CMAKE_AUTOMATIC_GUI_TESTING)
|
||||||
|
install(TARGETS ${test} RUNTIME DESTINATION "../nana-demo/")
|
||||||
|
message("... to build: ${dir}${test}.cpp" )
|
||||||
|
endforeach( test ${files})
|
||||||
|
function(set_nana_test)
|
||||||
|
|
||||||
|
set_nana_test(demos_dir demos)
|
||||||
foreach ( test ${tests})
|
set_nana_test(examples_dir examples)
|
||||||
add_executable(${test} "${test}.cpp")
|
|
||||||
set_property( TARGET ${test} PROPERTY CXX_STANDARD 14 )
|
|
||||||
target_link_libraries(${test} ${PROJECT_NAME})
|
|
||||||
#if(NANA_CMAKE_AUTOMATIC_GUI_TESTING)
|
|
||||||
#add_custom_command( TARGET ${test} POST_BUILD COMMAND ${test} )
|
|
||||||
#add_custom_target(do_always_${test} ALL COMMAND ${test})
|
|
||||||
#add_test(${test} COMMAND ${test})
|
|
||||||
#endif(NANA_CMAKE_AUTOMATIC_GUI_TESTING)
|
|
||||||
install(TARGETS ${test} RUNTIME DESTINATION "../nana-demo/")
|
|
||||||
message("... to build: ${test}.cpp" )
|
|
||||||
endforeach( test ${tests})
|
|
||||||
|
|
||||||
endif (NANA_CMAKE_BUILD_DEMOS)
|
endif (NANA_CMAKE_BUILD_DEMOS)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user