mirror of https://github.com/CGAL/cgal
Add a new custom target ALL_CGAL_TARGETS to track all targets
That will include also targets with `EXCLUDE_FROM_ALL`.
This commit is contained in:
parent
6344df2474
commit
f45c16f815
|
|
@ -959,12 +959,17 @@ endif()
|
|||
#
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
|
||||
if(NOT TARGET ALL_CGAL_TARGETS)
|
||||
add_custom_target( ALL_CGAL_TARGETS )
|
||||
endif()
|
||||
|
||||
macro( add_programs subdir target ON_OFF )
|
||||
|
||||
cache_set( CGAL_EXECUTABLE_TARGETS "" )
|
||||
|
||||
add_custom_target( ${target} )
|
||||
|
||||
add_dependencies( ALL_CGAL_TARGETS ${target} )
|
||||
|
||||
option( WITH_${target} "Select ${target}" ${ON_OFF} )
|
||||
if ( WITH_${target} )
|
||||
add_subdirectory( ${subdir} EXCLUDE_FROM_ALL )
|
||||
|
|
|
|||
|
|
@ -98,8 +98,12 @@ function(cgal_add_compilation_test exe_name)
|
|||
COMMAND ${TIME_COMMAND} "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target "${exe_name}")
|
||||
set_property(TEST "compilation_of__${exe_name}"
|
||||
APPEND PROPERTY LABELS "${PROJECT_NAME}")
|
||||
if(NOT TARGET ALL_CGAL_TARGETS)
|
||||
add_custom_target( ALL_CGAL_TARGETS )
|
||||
endif()
|
||||
if(NOT TARGET cgal_check_build_system)
|
||||
add_custom_target(cgal_check_build_system)
|
||||
add_dependencies( ALL_CGAL_TARGETS cgal_check_build_system )
|
||||
endif()
|
||||
if(NOT TEST check_build_system)
|
||||
add_test(NAME "check_build_system"
|
||||
|
|
|
|||
|
|
@ -72,7 +72,10 @@ function (collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES)
|
|||
# CMakeLists.txt can be the target like if it was an imported
|
||||
# target.
|
||||
add_library(CGAL::${LIBRARY_NAME} ALIAS ${LIBRARY_NAME})
|
||||
|
||||
if(NOT TARGET ALL_CGAL_TARGETS)
|
||||
add_custom_target( ALL_CGAL_TARGETS )
|
||||
endif()
|
||||
add_dependencies( ALL_CGAL_TARGETS ${LIBRARY_NAME} )
|
||||
if(CGAL_AUTO_LINK_ENABLED)
|
||||
if (NOT CGAL_HEADER_ONLY)
|
||||
set_target_properties( ${LIBRARY_NAME} PROPERTIES
|
||||
|
|
|
|||
Loading…
Reference in New Issue