Do no test demos

New directory property named `CGAL_NO_TESTING`. If set to `TRUE`, then
the automatic generating of CTest test will be disabled.

(cherry picked from commit 5d540fc1989c86438090b0212883b15cd121cf92)
This commit is contained in:
Laurent Rineau 2016-09-07 14:35:49 +02:00
parent 038207bc15
commit 87a2248ab6
3 changed files with 14 additions and 2 deletions

View File

@ -20,6 +20,12 @@ function(create_single_source_cgal_program firstfile )
add_executable(${exe_name} ${all})
get_directory_property(folder_NO_TESTING CGAL_NO_TESTING)
if(folder_NO_TESTING OR NOT BUILD_TESTING)
set(NO_TESTING TRUE)
endif()
if(NOT NO_TESTING)
cgal_add_test(${exe_name})
endif(NOT NO_TESTING)

View File

@ -701,6 +701,7 @@ function(process_CGAL_subdirectory entry subdir type_name)
if(ADD_SUBDIR)
message("\n-- Configuring ${subdir} in ${subdir}/${ENTRY_DIR_NAME}")
if(EXISTS ${entry}/CMakeLists.txt)
set(source_dir ${entry})
add_subdirectory( ${entry} ${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME} )
else()
if(CGAL_CREATE_CMAKE_SCRIPT)
@ -711,10 +712,15 @@ function(process_CGAL_subdirectory entry subdir type_name)
RESULT_VARIABLE RESULT_VAR OUTPUT_QUIET)
if(NOT RESULT_VAR)
# message("Subdir ${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}")
add_subdirectory( "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}" "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}")
set(source_dir "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}")
add_subdirectory( "${source_dir}" "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}")
endif()
endif()
endif()
if(source_dir AND type_name STREQUAL "demo")
# Do not test demos
set_property(DIRECTORY "${entry}" PROPERTY CGAL_NO_TESTING TRUE)
endif()
else()
message(STATUS "${subdir}/${ENTRY_DIR_NAME} is in dont_submit")
endif()

View File

@ -32,7 +32,7 @@ foreach( entry ${list} )
# If there is no .cpp files, ignore the sub-directory
if(files)
process_CGAL_subdirectory("${entry}" demo demo)
process_CGAL_subdirectory("${entry}" demo demo)
# Note: process_CGAL_subdirectory is defined in cmake/modules/CGAL_Macros.cmake
endif()