diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt index f7ab51dc7cc..9d17f95361a 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt @@ -23,6 +23,8 @@ if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND) add_compile_definitions(QT_NO_KEYWORDS) include_directories( BEFORE ./ ) + # Arrangement package includes + add_definitions(-DQT_NO_KEYWORDS) option(COMPILE_UTILS_INCREMENTALLY "Compile files in Utils directory incrementally, or compile them all as a unit. \ Incremental compilation will be better for development and consume less \ diff --git a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt index 4ad3d613ab5..f63a444cc7c 100644 --- a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt +++ b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt @@ -19,23 +19,6 @@ if(NOT Boost_FOUND) endif() -find_package(OpenMesh QUIET) - -if(OpenMesh_FOUND) - include(UseOpenMesh) - add_definitions(-DCGAL_USE_OPENMESH) -else() - message(STATUS "Examples that use OpenMesh will not be compiled.") -endif() - -find_package(METIS) - -if(METIS_FOUND) - include_directories(${METIS_INCLUDE_DIRS}) -else() - message(STATUS "Examples that use the METIS library will not be compiled.") -endif() - # include for local directory # include for local package @@ -59,12 +42,21 @@ create_single_source_cgal_program("transform_iterator.cpp") create_single_source_cgal_program("copy_polyhedron.cpp") +find_package( OpenMesh QUIET ) if(OpenMesh_FOUND) target_link_libraries( copy_polyhedron PRIVATE ${OPENMESH_LIBRARIES} ) target_compile_definitions( copy_polyhedron PRIVATE -DCGAL_USE_OPENMESH ) +else() + message(STATUS "Examples that use OpenMesh will not be compiled.") endif() -if(METIS_FOUND) - create_single_source_cgal_program("polyhedron_partition.cpp") - target_link_libraries(polyhedron_partition PRIVATE ${METIS_LIBRARIES}) +find_package( METIS ) +if( METIS_FOUND ) + create_single_source_cgal_program( "polyhedron_partition.cpp" ) + if( METIS_FOUND ) + target_include_directories( polyhedron_partition PRIVATE ${METIS_INCLUDE_DIRS} ) + target_link_libraries( polyhedron_partition PRIVATE ${METIS_LIBRARIES} ) + else() + message( STATUS "Examples that use the METIS library will not be compiled." ) + endif() endif() diff --git a/BGL/examples/BGL_surface_mesh/CMakeLists.txt b/BGL/examples/BGL_surface_mesh/CMakeLists.txt index 92d4c226359..f07081a0cd8 100644 --- a/BGL/examples/BGL_surface_mesh/CMakeLists.txt +++ b/BGL/examples/BGL_surface_mesh/CMakeLists.txt @@ -13,12 +13,10 @@ create_single_source_cgal_program("surface_mesh_dual.cpp") create_single_source_cgal_program("connected_components.cpp") find_package(METIS) - -if(METIS_FOUND) - include_directories(${METIS_INCLUDE_DIRS}) - - create_single_source_cgal_program("surface_mesh_partition.cpp") - target_link_libraries(surface_mesh_partition PRIVATE ${METIS_LIBRARIES}) +if( METIS_FOUND ) + create_single_source_cgal_program( "surface_mesh_partition.cpp" ) + target_include_directories( surface_mesh_partition PRIVATE ${METIS_INCLUDE_DIRS} ) + target_link_libraries( surface_mesh_partition PRIVATE ${METIS_LIBRARIES} ) else() message(STATUS "Examples that use the METIS library will not be compiled.") endif() diff --git a/CGAL_Core/src/CGAL_Core/BigFloat.cpp b/CGAL_Core/src/CGAL_Core/BigFloat.cpp deleted file mode 100644 index 6a566a4ffdf..00000000000 --- a/CGAL_Core/src/CGAL_Core/BigFloat.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/**************************************************************************** - * Core Library Version 1.7, August 2004 - * Copyright (c) 1995-2004 Exact Computation Project - * All rights reserved. - * - * This file is part of CGAL (www.cgal.org). - * - * File: BigFloat.cpp - * Synopsis: - * BigFloat numbers with error bounds - * - * EXACTNESS PROPERTY: - * ================== - * For BigFloats that are exact (i.e., error=0), - * addition/subtraction and multiplication return the - * exact result (i.e., error=0). We also introduce the operation - * div2(), which simply divides a BigFloat by 2, - * but this again preserves exactness. Such exactness - * properties are used in our Newton iteration/Sturm Sequences. - * - * Written by - * Chee Yap - * Chen Li - * Zilin Du - * - * WWW URL: http://cs.nyu.edu/exact/ - * Email: exact@cs.nyu.edu - * - * $URL$ - * $Id$ - * SPDX-License-Identifier: LGPL-3.0-or-later - ***************************************************************************/ - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif diff --git a/CGAL_Core/src/CGAL_Core/CMakeLists.txt b/CGAL_Core/src/CGAL_Core/CMakeLists.txt deleted file mode 100644 index 182b102f6b6..00000000000 --- a/CGAL_Core/src/CGAL_Core/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -include(CGAL_SetupCGAL_CoreDependencies) - -message("Configuring libCGAL_Core") -if(CGAL_Core_FOUND) - - collect_cgal_library(CGAL_Core "") - - if(CGAL_HEADER_ONLY) - set(keyword INTERFACE) - else() - set(keyword PUBLIC) - endif() - - cgal_setup_cgal_core_dependencies(CGAL_Core ${keyword}) - - message("libCGAL_Core is configured") -endif() diff --git a/CGAL_Core/src/CGAL_Core/CoreAux.cpp b/CGAL_Core/src/CGAL_Core/CoreAux.cpp deleted file mode 100644 index 936a9c3439c..00000000000 --- a/CGAL_Core/src/CGAL_Core/CoreAux.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/**************************************************************************** - * Core Library Version 1.7, August 2004 - * Copyright (c) 1995-2004 Exact Computation Project - * All rights reserved. - * - * This file is part of CGAL (www.cgal.org). - * - * File: CoreAux.cpp - * Synopsis: - * Auxiliary routines such as ceiling of log_2, etc. - * they are not specific to any Core classes. - * - * Written by - * Chee Yap - * Chen Li - * Zilin Du - * - * WWW URL: http://cs.nyu.edu/exact/ - * Email: exact@cs.nyu.edu - * - * $URL$ - * $Id$ - * SPDX-License-Identifier: LGPL-3.0-or-later - ***************************************************************************/ - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif diff --git a/CGAL_Core/src/CGAL_Core/CoreDefs.cpp b/CGAL_Core/src/CGAL_Core/CoreDefs.cpp deleted file mode 100644 index 56b0d1df410..00000000000 --- a/CGAL_Core/src/CGAL_Core/CoreDefs.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/**************************************************************************** - * Core Library Version 1.7, August 2004 - * Copyright (c) 1995-2004 Exact Computation Project - * All rights reserved. - * - * This file is part of CGAL (www.cgal.org). - * - * File: CoreDefs.cpp - * Synopsis: - * Useful parameters for Core Library which users may change - * - * Written by - * Chee Yap - * Chen Li - * Zilin Du - * - * WWW URL: http://cs.nyu.edu/exact/ - * Email: exact@cs.nyu.edu - * - * $URL$ - * $Id$ - * SPDX-License-Identifier: LGPL-3.0-or-later - ***************************************************************************/ - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif diff --git a/CGAL_Core/src/CGAL_Core/CoreIO.cpp b/CGAL_Core/src/CGAL_Core/CoreIO.cpp deleted file mode 100644 index a0c42cc65da..00000000000 --- a/CGAL_Core/src/CGAL_Core/CoreIO.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/**************************************************************************** - * Core Library Version 1.7, August 2004 - * Copyright (c) 1995-2004 Exact Computation Project - * All rights reserved. - * - * This file is part of CGAL (www.cgal.org). - * - * File: CoreIO.cpp - * - * Written by - * Zilin Du - * Chee Yap - * - * WWW URL: http://cs.nyu.edu/exact/ - * Email: exact@cs.nyu.edu - * - * $URL$ - * $Id$ - * SPDX-License-Identifier: LGPL-3.0-or-later - ***************************************************************************/ - -#ifndef CGAL_HEADER_ONLY -#include -#endif diff --git a/CGAL_Core/src/CGAL_Core/Expr.cpp b/CGAL_Core/src/CGAL_Core/Expr.cpp deleted file mode 100644 index 747f202da46..00000000000 --- a/CGAL_Core/src/CGAL_Core/Expr.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/**************************************************************************** - * Core Library Version 1.7, August 2004 - * Copyright (c) 1995-2004 Exact Computation Project - * All rights reserved. - * - * This file is part of CGAL (www.cgal.org). - * - * File: Expr.cpp - * - * Written by - * Koji Ouchi - * Chee Yap - * Igor Pechtchanski - * Vijay Karamcheti - * Chen Li - * Zilin Du - * Sylvain Pion - * - * WWW URL: http://cs.nyu.edu/exact/ - * Email: exact@cs.nyu.edu - * - * $URL$ - * $Id$ - * SPDX-License-Identifier: LGPL-3.0-or-later - ***************************************************************************/ - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif diff --git a/CGAL_Core/src/CGAL_Core/GmpIO.cpp b/CGAL_Core/src/CGAL_Core/GmpIO.cpp deleted file mode 100644 index 89adf2ebec7..00000000000 --- a/CGAL_Core/src/CGAL_Core/GmpIO.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/**************************************************************************** - * Core Library Version 1.7, August 2004 - * Copyright (c) 1995-2004 Exact Computation Project - * All rights reserved. - * - * This file is part of CGAL (www.cgal.org). - * - * file: GmpIO.cpp - * Adapted from multi-files under /cxx in GMP's source distribution - * - * Zilin Du, 2003 - * - * $URL$ - * $Id$ - * SPDX-License-Identifier: LGPL-3.0-only - ***************************************************************************/ - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif diff --git a/CGAL_Core/src/CGAL_Core/Real.cpp b/CGAL_Core/src/CGAL_Core/Real.cpp deleted file mode 100644 index aab3de549fc..00000000000 --- a/CGAL_Core/src/CGAL_Core/Real.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/**************************************************************************** - * Core Library Version 1.7, August 2004 - * Copyright (c) 1995-2004 Exact Computation Project - * All rights reserved. - * - * This file is part of CGAL (www.cgal.org). - * - * File: Real.cpp - * Synopsis: The Real class is a superclass for all the number - * systems in the Core Library (int, long, float, double, - * BigInt, BigRat, BigFloat, etc) - * - * Written by - * Koji Ouchi - * Chee Yap - * Chen Li - * Zilin Du - * Sylvain Pion - * - * WWW URL: http://cs.nyu.edu/exact/ - * Email: exact@cs.nyu.edu - * - * $URL$ - * $Id$ - * SPDX-License-Identifier: LGPL-3.0-or-later - ***************************************************************************/ - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif diff --git a/CGAL_Core/src/CGAL_Core/extLong.cpp b/CGAL_Core/src/CGAL_Core/extLong.cpp deleted file mode 100644 index d2072c3d388..00000000000 --- a/CGAL_Core/src/CGAL_Core/extLong.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/**************************************************************************** - * Core Library Version 1.7, August 2004 - * Copyright (c) 1995-2004 Exact Computation Project - * All rights reserved. - * - * This file is part of CGAL (www.cgal.org). - * - * File: extLong.cpp - * Synopsis: - * The class extLong is basically a wrapper around the machine - * type long. It is an important class to provide several - * additional facilities to detect overflows and undefined values. - * Future development includes extensions to level arithmetic - * (i.e., if a number overflows level i, we will go to level i+1). - * Level i representation of a number n is just i iterations - * of log_2 applied to n. - * - * Written by - * Chee Yap - * Chen Li - * Zilin Du - * Sylvain Pion - * - * WWW URL: http://cs.nyu.edu/exact/ - * Email: exact@cs.nyu.edu - * - * $URL$ - * $Id$ - * SPDX-License-Identifier: LGPL-3.0-or-later - ***************************************************************************/ - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/CMakeLists.txt b/CGAL_ImageIO/src/CGAL_ImageIO/CMakeLists.txt deleted file mode 100644 index f24e6d39961..00000000000 --- a/CGAL_ImageIO/src/CGAL_ImageIO/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -message("Configuring libCGAL_ImageIO") - -collect_cgal_library(CGAL_ImageIO "") - -include(CGAL_SetupCGAL_ImageIODependencies) - -if(CGAL_HEADER_ONLY) - set(keyword "INTERFACE") -endif() - -cgal_setup_cgal_imageio_dependencies(CGAL_ImageIO ${keyword}) - -if(COMMAND add_config_flag) - set(CGAL_HAS_IMAGEIO TRUE) - add_config_flag(CGAL_HAS_IMAGEIO) -endif() - -if(ZLIB_FOUND) - get_dependency_version(ZLIB) -endif() - -message("libCGAL_ImageIO is configured") diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/ImageIO.cpp b/CGAL_ImageIO/src/CGAL_ImageIO/ImageIO.cpp deleted file mode 100644 index f5760138ccf..00000000000 --- a/CGAL_ImageIO/src/CGAL_ImageIO/ImageIO.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005, 2006 ASCLEPIOS Project, INRIA Sophia-Antipolis (France) -// Copyright (c) 2007 Geometrica Project, INRIA Sophia-Antipolis (France) -// Copyright (c) 2008 GeometryFactory, Sophia-Antipolis (France) -// All rights reserved. -// -// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/Image_3.cpp b/CGAL_ImageIO/src/CGAL_ImageIO/Image_3.cpp deleted file mode 100644 index 98be1910a61..00000000000 --- a/CGAL_ImageIO/src/CGAL_ImageIO/Image_3.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005-2008 INRIA Sophia-Antipolis (France). -// 2008 GeometryFactory, Sophia Antipolis (France) -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org) -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// Author(s) : Laurent Rineau, Pierre Alliez - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/LICENSE b/CGAL_ImageIO/src/CGAL_ImageIO/LICENSE deleted file mode 100644 index 08d4e2694b8..00000000000 --- a/CGAL_ImageIO/src/CGAL_ImageIO/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2005, 2006 ASCLEPIOS Project, INRIA Sophia-Antipolis (France) -// All rights reserved. -// -// The files in this directory are part of the ImageIO Library. -// You can redistribute them and/or modify them under the terms of the -// GNU Lesser General Public License as published by the Free Software Foundation; -// either version 3 of the License, or (at your option) any later version. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// Author(s) : Olivier Clatz, Herve Delingette et Gregoire Malandain diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/analyze.cpp b/CGAL_ImageIO/src/CGAL_ImageIO/analyze.cpp deleted file mode 100644 index 7f627a9cb86..00000000000 --- a/CGAL_ImageIO/src/CGAL_ImageIO/analyze.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France) -// All rights reserved. -// -// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/bmp.cpp b/CGAL_ImageIO/src/CGAL_ImageIO/bmp.cpp deleted file mode 100644 index 0b8494a966a..00000000000 --- a/CGAL_ImageIO/src/CGAL_ImageIO/bmp.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France) -// All rights reserved. -// -// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/bmpendian.cpp b/CGAL_ImageIO/src/CGAL_ImageIO/bmpendian.cpp deleted file mode 100644 index 9545c6cfb3d..00000000000 --- a/CGAL_ImageIO/src/CGAL_ImageIO/bmpendian.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France) -// All rights reserved. -// -// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/bmpread.cpp b/CGAL_ImageIO/src/CGAL_ImageIO/bmpread.cpp deleted file mode 100644 index 2c905338b8e..00000000000 --- a/CGAL_ImageIO/src/CGAL_ImageIO/bmpread.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France) -// All rights reserved. -// -// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/convert.cpp b/CGAL_ImageIO/src/CGAL_ImageIO/convert.cpp deleted file mode 100644 index a0a610b1a79..00000000000 --- a/CGAL_ImageIO/src/CGAL_ImageIO/convert.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France) -// All rights reserved. -// -// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/fgetns.cpp b/CGAL_ImageIO/src/CGAL_ImageIO/fgetns.cpp deleted file mode 100644 index e123117e3c0..00000000000 --- a/CGAL_ImageIO/src/CGAL_ImageIO/fgetns.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France) -// All rights reserved. -// -// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/gif.cpp b/CGAL_ImageIO/src/CGAL_ImageIO/gif.cpp deleted file mode 100644 index 62d5c585087..00000000000 --- a/CGAL_ImageIO/src/CGAL_ImageIO/gif.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France) -// All rights reserved. -// -// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/gis.cpp b/CGAL_ImageIO/src/CGAL_ImageIO/gis.cpp deleted file mode 100644 index 0551ff6a5f9..00000000000 --- a/CGAL_ImageIO/src/CGAL_ImageIO/gis.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France) -// All rights reserved. -// -// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/inr.cpp b/CGAL_ImageIO/src/CGAL_ImageIO/inr.cpp deleted file mode 100644 index 4b3870cf55c..00000000000 --- a/CGAL_ImageIO/src/CGAL_ImageIO/inr.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France) -// All rights reserved. -// -// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/iris.cpp b/CGAL_ImageIO/src/CGAL_ImageIO/iris.cpp deleted file mode 100644 index 4e7eeffc803..00000000000 --- a/CGAL_ImageIO/src/CGAL_ImageIO/iris.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France) -// All rights reserved. -// -// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/mincio.cpp b/CGAL_ImageIO/src/CGAL_ImageIO/mincio.cpp deleted file mode 100644 index c3e71de7b49..00000000000 --- a/CGAL_ImageIO/src/CGAL_ImageIO/mincio.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France) -// All rights reserved. -// -// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/pnm.cpp b/CGAL_ImageIO/src/CGAL_ImageIO/pnm.cpp deleted file mode 100644 index 45bb0b3c455..00000000000 --- a/CGAL_ImageIO/src/CGAL_ImageIO/pnm.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France) -// All rights reserved. -// -// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/recbuffer.cpp b/CGAL_ImageIO/src/CGAL_ImageIO/recbuffer.cpp deleted file mode 100644 index c7a23780a65..00000000000 --- a/CGAL_ImageIO/src/CGAL_ImageIO/recbuffer.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France) -// All rights reserved. -// -// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/recline.cpp b/CGAL_ImageIO/src/CGAL_ImageIO/recline.cpp deleted file mode 100644 index fc57c491bef..00000000000 --- a/CGAL_ImageIO/src/CGAL_ImageIO/recline.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France) -// All rights reserved. -// -// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/reech4x4.cpp b/CGAL_ImageIO/src/CGAL_ImageIO/reech4x4.cpp deleted file mode 100644 index af0e25c09c5..00000000000 --- a/CGAL_ImageIO/src/CGAL_ImageIO/reech4x4.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2005-2008 ASCLEPIOS Project, INRIA Sophia-Antipolis (France) -// All rights reserved. -// -// This file is part of the ImageIO Library, and as been adapted for CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt index ddcd9765d56..238e333c399 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt +++ b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt @@ -35,67 +35,36 @@ endif() find_package(IPE 6) if(IPE_FOUND) - include_directories(BEFORE ${IPE_INCLUDE_DIR}) - - if(${IPE_VERSION} EQUAL "7") + if (${IPE_VERSION} EQUAL "7") set(WITH_IPE_7 ON) elseif(${IPE_VERSION} EQUAL "6") set(WITH_IPE_7 OFF) else() - message( - "-- Error: ${IPE_VERSION} is not a supported version of IPE (only 6 and 7 are)." - ) + message("-- Error: ${IPE_VERSION} is not a supported version of IPE (only 6 and 7 are).") set(IPE_FOUND FALSE) endif() - # starting ipe 7.2.1, a compiler with c++11 must be used to compile ipelets - if(${IPE_VERSION} EQUAL "7" - AND ${IPE_MINOR_VERSION_1} GREATER "1" - AND ${IPE_MINOR_VERSION_2} GREATER "0") - message( - STATUS - "Starting from Ipe 7.2.1 a compiler with c++11 support must be used") - - list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_generalized_initializers has_cpp11) - if(has_cpp11 LESS 0) - message( - STATUS - "NOTICE: This demo requires a C++11 compiler and will not be compiled." - ) - return() - endif() - - # Use C++11 for this directory and its sub-directories. - set(CMAKE_CXX_STANDARD 11) - set(CMAKE_CXX_STANDARD_REQUIRED TRUE) - - endif() endif() -if(IPE_FOUND AND IPE_VERSION) - if(WITH_IPE_7) - add_definitions(-DCGAL_USE_IPE_7) - endif() +if(IPE_FOUND AND IPE_VERSION) message("-- Using IPE version ${IPE_VERSION} compatibility.") #setting installation directory get_filename_component(IPE_LIBRARY_DIR ${IPE_LIBRARIES} PATH) - if(IPE_FOUND AND NOT IPELET_INSTALL_DIR) - if(WITH_IPE_7) + if (IPE_FOUND AND NOT IPELET_INSTALL_DIR) + if (WITH_IPE_7) remove_leading_zero(IPE_MINOR_VERSION_1) remove_leading_zero(IPE_MINOR_VERSION_2) - set(INSTALL_PATHS - "${IPE_LIBRARY_DIR}/ipe/7.${IPE_MINOR_VERSION_1}.${IPE_MINOR_VERSION_2}/ipelets/" - ) - find_path( - IPELET_INSTALL_DIR - NAMES libgoodies.lua goodies.lua - PATHS ${INSTALL_PATHS} - DOC "The folder where ipelets will be installed" ENV IPELETPATH) + set(INSTALL_PATHS "${IPE_LIBRARY_DIR}/ipe/7.${IPE_MINOR_VERSION_1}.${IPE_MINOR_VERSION_2}/ipelets/") + find_path(IPELET_INSTALL_DIR + NAMES libgoodies.lua goodies.lua + PATHS ${INSTALL_PATHS} + DOC "The folder where ipelets will be installed" + ENV IPELETPATH + ) else() - foreach(VER RANGE 28 40) - string(REPLACE XX ${VER} PATHC - "${IPE_LIBRARY_DIR}/ipe/6.0preXX/ipelets/") + foreach (VER RANGE 28 40) + string(REPLACE XX ${VER} PATHC "${IPE_LIBRARY_DIR}/ipe/6.0preXX/ipelets/" ) set(INSTALL_PATHS ${INSTALL_PATHS} ${PATHC}) endforeach() set(INSTALL_PATHS ${INSTALL_PATHS} ${PATHC}) @@ -146,16 +115,20 @@ if(IPE_FOUND AND IPE_VERSION) foreach(IPELET ${CGAL_IPELETS}) add_library(CGAL_${IPELET} MODULE ${IPELET}.cpp) + target_include_directories(CGAL_${IPELET} BEFORE PRIVATE ${IPE_INCLUDE_DIR}) + if (WITH_IPE_7) + target_compile_definitions(CGAL_${IPELET} PRIVATE CGAL_USE_IPE_7) + endif() + add_to_cached_list(CGAL_EXECUTABLE_TARGETS CGAL_${IPELET}) target_link_libraries(CGAL_${IPELET} PRIVATE CGAL::CGAL CGAL::Eigen3_support ${IPE_LIBRARIES}) if(IPELET_INSTALL_DIR) install(TARGETS CGAL_${IPELET} DESTINATION ${IPELET_INSTALL_DIR}) - if(WITH_IPE_7) - install(FILES ./lua/libCGAL_${IPELET}.lua - DESTINATION ${IPELET_INSTALL_DIR}) #only for ipe 7 + if (WITH_IPE_7) + install(FILES ./lua/libCGAL_${IPELET}.lua DESTINATION ${IPELET_INSTALL_DIR}) #only for ipe 7 endif() - endif() + endif () cgal_add_compilation_test(CGAL_${IPELET}) endforeach(IPELET) if(CGAL_Core_FOUND) @@ -170,8 +143,5 @@ if(IPE_FOUND AND IPE_VERSION) cgal_add_compilation_test(simple_triangulation) else() - message( - STATUS - "NOTICE: This program requires the Ipe include files and library, and will not be compiled." - ) + message(STATUS "NOTICE: This program requires the Ipe include files and library, and will not be compiled.") endif() diff --git a/Documentation/doc/Documentation/Developer_manual/Chapter_checks.txt b/Documentation/doc/Documentation/Developer_manual/Chapter_checks.txt index 2646529280a..52083c63a03 100644 --- a/Documentation/doc/Documentation/Developer_manual/Chapter_checks.txt +++ b/Documentation/doc/Documentation/Developer_manual/Chapter_checks.txt @@ -183,9 +183,9 @@ You should place the generated file in the proper directory (and possibly rename it). Then you can use the checks in the following fashion. \code{.cpp} - #include + #include - void optimisation\_foo( int i) + void optimisation_foo( int i) { CGAL_optimisation_precondition_msg( i == 42, "Only 42 allowed!"); // ... diff --git a/Documentation/doc/Documentation/Third_party.txt b/Documentation/doc/Documentation/Third_party.txt index 55705a34ad8..d376747423e 100644 --- a/Documentation/doc/Documentation/Third_party.txt +++ b/Documentation/doc/Documentation/Third_party.txt @@ -23,7 +23,7 @@ supporting C++14 or later. Older versions of the above listed compilers might work, but no guarantee is provided. \section seccmake CMake -Version 3.1 or later +Version 3.12 or later In order to configure and build the \cgal examples, demos, or libraries, you need CMake, a cross-platform "makefile generator". diff --git a/Geomview/src/CGAL/Geomview_stream.cpp b/Geomview/src/CGAL/Geomview_stream.cpp deleted file mode 100644 index 8f316b4e6a5..00000000000 --- a/Geomview/src/CGAL/Geomview_stream.cpp +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 1999-2004 -// Utrecht University (The Netherlands), -// ETH Zurich (Switzerland), -// INRIA Sophia-Antipolis (France), -// Max-Planck-Institute Saarbruecken (Germany), -// and Tel-Aviv University (Israel). All rights reserved. -// -// This file is part of CGAL (www.cgal.org) -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : Andreas Fabri, Herve Bronnimann, Sylvain Pion - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif diff --git a/GraphicsView/src/CGAL_Qt5/CMakeLists.txt b/GraphicsView/src/CGAL_Qt5/CMakeLists.txt deleted file mode 100644 index 14204398dd3..00000000000 --- a/GraphicsView/src/CGAL_Qt5/CMakeLists.txt +++ /dev/null @@ -1,66 +0,0 @@ -message("Configuring libCGAL_Qt5") - -if(NOT POLICY CMP0070 AND POLICY CMP0053) - # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. - cmake_policy(SET CMP0053 OLD) -endif() - -include(CGAL_SetupCGAL_Qt5Dependencies) - -if(CGAL_Qt5_MISSING_DEPS) - message( - STATUS - "libCGAL_Qt5 is missing the dependencies: ${CGAL_Qt5_MISSING_DEPS} cannot be configured." - ) - return() -endif() - -message(STATUS "USING Qt5_VERSION = '${Qt5Core_VERSION_STRING}'") -if(NOT CGAL_HEADER_ONLY) - collect_cgal_library( - CGAL_Qt5 - "${_CGAL_Qt5_MOC_FILES_private};${_CGAL_Qt5_RESOURCE_FILES_private};${_CGAL_Qt5_UI_FILES}" - ) - target_include_directories(CGAL_Qt5 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) -else() - collect_cgal_library(CGAL_Qt5 "") -endif() - -if(CGAL_HEADER_ONLY) - set(keyword "INTERFACE") -endif() - -cgal_setup_cgal_qt5_dependencies(CGAL_Qt5 ${keyword}) - -if(COMMAND add_config_flag) - set(CGAL_HAS_QT5 TRUE) - add_config_flag(CGAL_HAS_QT5) -endif() - -install( - DIRECTORY "../../include/CGAL/Qt/" - DESTINATION "${CGAL_INSTALL_INC_DIR}/CGAL/Qt" - COMPONENT CGAL_Qt5) -if(CGAL_HEADER_ONLY) - if(EXISTS ${CGAL_MODULES_DIR}/demo/resources) - install( - DIRECTORY "${CGAL_MODULES_DIR}/demo/resources/" - DESTINATION "${CGAL_INSTALL_CMAKE_DIR}/demo/resources" - COMPONENT CGAL_Qt5) - install( - DIRECTORY "${CGAL_MODULES_DIR}/demo/icons/" - DESTINATION "${CGAL_INSTALL_CMAKE_DIR}/demo/icons" - COMPONENT CGAL_Qt5) - else() - install( - DIRECTORY "../../demo/resources/" - DESTINATION "${CGAL_INSTALL_CMAKE_DIR}/demo/resources" - COMPONENT CGAL_Qt5) - install( - DIRECTORY "../../demo/icons/" - DESTINATION "${CGAL_INSTALL_CMAKE_DIR}/demo/icons" - COMPONENT CGAL_Qt5) - endif() -endif() - -message("libCGAL_Qt5 is configured") diff --git a/GraphicsView/src/CGAL_Qt5/DemosMainWindow.cpp b/GraphicsView/src/CGAL_Qt5/DemosMainWindow.cpp deleted file mode 100644 index cc6726f3492..00000000000 --- a/GraphicsView/src/CGAL_Qt5/DemosMainWindow.cpp +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2008 GeometryFactory Sarl (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : Andreas Fabri -// Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include -#include -#include -#endif // CGAL_HEADER_ONLY diff --git a/GraphicsView/src/CGAL_Qt5/GraphicsView.qtmoc.cmake b/GraphicsView/src/CGAL_Qt5/GraphicsView.qtmoc.cmake deleted file mode 100644 index 95ba7c31f5a..00000000000 --- a/GraphicsView/src/CGAL_Qt5/GraphicsView.qtmoc.cmake +++ /dev/null @@ -1,8 +0,0 @@ -# moc files that are compiled directly as cpp files -qt5_wrap_cpp(mocfiles ../../include/CGAL/Qt/GraphicsViewNavigation.h - ../../include/CGAL/Qt/DemosMainWindow.h - ../../include/CGAL/Qt/GraphicsItem.h - ../../include/CGAL/Qt/GraphicsViewInput.h) - -# qrc files (resources files, that contain icons, at least) -qt5_add_resources ( RESOURCE_FILES ../../demo/resources/CGAL.qrc ../../demo/icons/Input.qrc ../../demo/icons/File.qrc ../../demo/icons/Triangulation_2.qrc) diff --git a/GraphicsView/src/CGAL_Qt5/GraphicsViewNavigation.cpp b/GraphicsView/src/CGAL_Qt5/GraphicsViewNavigation.cpp deleted file mode 100644 index fac60c7342d..00000000000 --- a/GraphicsView/src/CGAL_Qt5/GraphicsViewNavigation.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2008 GeometryFactory Sarl (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : Andreas Fabri -// Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/GraphicsView/src/CGAL_Qt5/GraphicsViewPolylineInput.cpp b/GraphicsView/src/CGAL_Qt5/GraphicsViewPolylineInput.cpp deleted file mode 100644 index 9876e5ce76a..00000000000 --- a/GraphicsView/src/CGAL_Qt5/GraphicsViewPolylineInput.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2008 GeometryFactory Sarl (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : Andreas Fabri -// Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/GraphicsView/src/CGAL_Qt5/camera.cpp b/GraphicsView/src/CGAL_Qt5/camera.cpp deleted file mode 100644 index 278cd06dfd2..00000000000 --- a/GraphicsView/src/CGAL_Qt5/camera.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2018 GeometryFactory Sarl (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: GPL-3.0-or-later -// -// Author(s) : Maxime Gimeno - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/GraphicsView/src/CGAL_Qt5/constraint.cpp b/GraphicsView/src/CGAL_Qt5/constraint.cpp deleted file mode 100644 index 3c052878a79..00000000000 --- a/GraphicsView/src/CGAL_Qt5/constraint.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2018 GeometryFactory Sarl (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: GPL-3.0-or-later -// -// Author(s) : Maxime Gimeno - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/GraphicsView/src/CGAL_Qt5/debug.cpp b/GraphicsView/src/CGAL_Qt5/debug.cpp deleted file mode 100644 index 59165a240b3..00000000000 --- a/GraphicsView/src/CGAL_Qt5/debug.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2008 GeometryFactory Sarl (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : Andreas Fabri -// Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/GraphicsView/src/CGAL_Qt5/frame.cpp b/GraphicsView/src/CGAL_Qt5/frame.cpp deleted file mode 100644 index e1f149f35bd..00000000000 --- a/GraphicsView/src/CGAL_Qt5/frame.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2018 GeometryFactory Sarl (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: GPL-3.0-or-later -// -// Author(s) : Maxime Gimeno - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/GraphicsView/src/CGAL_Qt5/keyFrameInterpolator.cpp b/GraphicsView/src/CGAL_Qt5/keyFrameInterpolator.cpp deleted file mode 100644 index 0ddb05d0aa2..00000000000 --- a/GraphicsView/src/CGAL_Qt5/keyFrameInterpolator.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2018 GeometryFactory Sarl (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: GPL-3.0-or-later -// -// Author(s) : Maxime Gimeno - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/GraphicsView/src/CGAL_Qt5/manipulatedCameraFrame.cpp b/GraphicsView/src/CGAL_Qt5/manipulatedCameraFrame.cpp deleted file mode 100644 index 5d24867991b..00000000000 --- a/GraphicsView/src/CGAL_Qt5/manipulatedCameraFrame.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2018 GeometryFactory Sarl (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: GPL-3.0-or-later -// -// Author(s) : Maxime Gimeno - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/GraphicsView/src/CGAL_Qt5/manipulatedFrame.cpp b/GraphicsView/src/CGAL_Qt5/manipulatedFrame.cpp deleted file mode 100644 index 99a10c2d700..00000000000 --- a/GraphicsView/src/CGAL_Qt5/manipulatedFrame.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2018 GeometryFactory Sarl (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: GPL-3.0-or-later -// -// Author(s) : Maxime Gimeno - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/GraphicsView/src/CGAL_Qt5/mouseGrabber.cpp b/GraphicsView/src/CGAL_Qt5/mouseGrabber.cpp deleted file mode 100644 index e92c7af56ea..00000000000 --- a/GraphicsView/src/CGAL_Qt5/mouseGrabber.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2018 GeometryFactory Sarl (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: GPL-3.0-or-later -// -// Author(s) : Maxime Gimeno - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/GraphicsView/src/CGAL_Qt5/qglviewer.cpp b/GraphicsView/src/CGAL_Qt5/qglviewer.cpp deleted file mode 100644 index 3a2134fbc3a..00000000000 --- a/GraphicsView/src/CGAL_Qt5/qglviewer.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2018 GeometryFactory Sarl (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: GPL-3.0-or-later -// -// Author(s) : Maxime Gimeno - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/GraphicsView/src/CGAL_Qt5/quaternion.cpp b/GraphicsView/src/CGAL_Qt5/quaternion.cpp deleted file mode 100644 index b9ee4d5fd1b..00000000000 --- a/GraphicsView/src/CGAL_Qt5/quaternion.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2018 GeometryFactory Sarl (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: GPL-3.0-or-later -// -// Author(s) : Maxime Gimeno - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/GraphicsView/src/CGAL_Qt5/resources.cpp b/GraphicsView/src/CGAL_Qt5/resources.cpp deleted file mode 100644 index 217660d9c2a..00000000000 --- a/GraphicsView/src/CGAL_Qt5/resources.cpp +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2011 GeometryFactory Sarl (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/GraphicsView/src/CGAL_Qt5/utility.cpp b/GraphicsView/src/CGAL_Qt5/utility.cpp deleted file mode 100644 index 247d18fc00a..00000000000 --- a/GraphicsView/src/CGAL_Qt5/utility.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2008 GeometryFactory Sarl (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial -// -// Author(s) : Andreas Fabri -// Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/GraphicsView/src/CGAL_Qt5/vec.cpp b/GraphicsView/src/CGAL_Qt5/vec.cpp deleted file mode 100644 index 85a4f8823b1..00000000000 --- a/GraphicsView/src/CGAL_Qt5/vec.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2018 GeometryFactory Sarl (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: GPL-3.0-or-later -// -// Author(s) : Maxime Gimeno - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt index 7e9f118ad9d..2dbde0e09b1 100644 --- a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt +++ b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt @@ -17,21 +17,20 @@ find_package(LEDA QUIET) # Find Qt5 itself find_package(Qt5 QUIET COMPONENTS OpenGL Gui) + if(CGAL_Qt5_FOUND AND Qt5_FOUND AND (CGAL_Core_FOUND OR LEDA_FOUND)) - include_directories(BEFORE ./ ./include) # ui files, created with Qt Designer qt5_wrap_ui(UIS HDT2.ui) qt5_add_resources(RESOURCE_FILES resources/Delaunay_triangulation_2.qrc) # cpp files - add_executable(HDT2 HDT2.cpp ${CGAL_Qt5_RESOURCE_FILES} ${RESOURCE_FILES} - ${UIS}) - add_to_cached_list(CGAL_EXECUTABLE_TARGETS HDT2) - target_link_libraries(HDT2 CGAL::CGAL CGAL::CGAL_Qt5 CGAL::CGAL_Core - Qt5::Widgets) + add_executable ( HDT2 HDT2.cpp ${CGAL_Qt5_RESOURCE_FILES} ${RESOURCE_FILES} ${UIS}) + target_include_directories(HDT2 PRIVATE ./ ./include) + add_to_cached_list( CGAL_EXECUTABLE_TARGETS HDT2 ) + target_link_libraries ( HDT2 CGAL::CGAL CGAL::CGAL_Qt5 CGAL::CGAL_Core Qt5::Widgets) else() message( STATUS diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/HDT2.cpp b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/HDT2.cpp index 9fbb9e6d730..1d32eba2c8f 100644 --- a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/HDT2.cpp +++ b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/HDT2.cpp @@ -11,7 +11,7 @@ #else #include #include - #include + #include "internal/Qt/HyperbolicPainterOstream.h" #endif #include diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 99281d11635..9697b7a6f99 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -4,33 +4,18 @@ # ${CMAKE_SOURCE_DIR} and to the root binary directory of the project as # ${CMAKE_BINARY_DIR} or ${CMAKE_BINARY_DIR}. if(NOT PROJECT_NAME) - cmake_minimum_required(VERSION 3.1...3.15) + cmake_minimum_required(VERSION 3.12...3.18) project(CGAL CXX C) endif() -if(POLICY CMP0056) - # https://cmake.org/cmake/help/v3.2/policy/CMP0056.html - # - # Fix a bug: `try_compile` should use `CMAKE_EXE_LINKER_FLAGS`. - # That variable can contain important flags like - # - # -static-libstdc++ -static-libgcc - # - cmake_policy(SET CMP0056 NEW) -endif() - +# Fix a bug: `try_compile` should use `CMAKE_EXE_LINKER_FLAGS`. +# That variable can contain important flags like +# +# -static-libstdc++ -static-libgcc +# # Use GNUInstallDirs to get canonical paths include(GNUInstallDirs) - #-------------------------------------------------------------------------------------------------- -# -# -= HEADER ONLY =- -# -#-------------------------------------------------------------------------------------------------- -option(CGAL_HEADER_ONLY - "Enable header-only mode of CGAL (no compilation of CGAL libraries)" - TRUE) - #-------------------------------------------------------------------------------------------------- # # -= PACKAGE SETUP =- @@ -127,11 +112,6 @@ else(CGAL_BRANCH_BUILD) # Enable testing with BUILD_TESTING option(BUILD_TESTING "Build the testing tree." OFF) - if(BUILD_TESTING AND NOT POLICY CMP0064) - message( - FATAL_ERROR "CGAL support of CTest requires CMake version 3.4 or later. -The variable BUILD_TESTING must be set of OFF.") - endif() if(BUILD_TESTING) enable_testing() endif() @@ -418,9 +398,9 @@ set(CGAL_ImageIO_SOVERSION "14.0.0") set(CGAL_Qt5_SONAME_VERSION "14") set(CGAL_Qt5_SOVERSION "14.0.0") -message(STATUS "CGAL_SONAME_VERSION=${CGAL_SONAME_VERSION}") -message(STATUS "CGAL_SOVERSION =${CGAL_SOVERSION}") -set(CGAL_BUILDING_LIBS TRUE) +message( STATUS "CGAL_SONAME_VERSION=${CGAL_SONAME_VERSION}" ) +message( STATUS "CGAL_SOVERSION =${CGAL_SOVERSION}" ) + set(CGAL_VERSION_DIR CGAL-${CGAL_VERSION}) set(CGAL_MODULES_REL_DIR cmake/modules) @@ -579,34 +559,6 @@ endif() message("== Detect external libraries ==") -# this is the place to tell which external libs are supporting -# Remarks: -# External libs configured when Qt5 lib of cgal are required -# Coin is used in KDS, but no FindCoin or FindCOIN exists -# There exists FindIPE, FindMKL, but they are only used to support supporting libs -list( - INSERT - CGAL_SUPPORTING_3RD_PARTY_LIBRARIES - 0 - GMP - MPFR - ZLIB - OpenGL - LEDA - MPFI - RS - RS3 - OpenNL - Eigen3 - ESBTL - Coin3D - NTL - IPE) - -# Where CMake is run several times, to avoid duplicates -list(REMOVE_DUPLICATES CGAL_SUPPORTING_3RD_PARTY_LIBRARIES) -hide_variable(CGAL_SUPPORTING_3RD_PARTY_LIBRARIES) - # set some to have special prefix macro(set_special_prefix library prefix) set(SPECIAL_PREFIXES @@ -640,13 +592,8 @@ if(CGAL_DISABLE_GMP) unset(MPFR_FOUND CACHE) unset(WITH_CGAL_Core) unset(WITH_CGAL_Core CACHE) - unset(WITH_GMP) - unset(WITH_GMP CACHE) unset(CGAL_USE_GMP) unset(CGAL_USE_GMP CACHE) - unset(WITH_MPFR) - unset(WITH_MPFR CACHE) - # Nasty trick to make sure is not used when CGAL_DISABLE_GMP is TRUE file(WRITE "${CMAKE_BINARY_DIR}/include/gmp.h" "#error GMP is disabled by the CMake option CGAL_DISABLE_GMP") @@ -660,24 +607,6 @@ else() endif() hide_variable(CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES) -foreach(lib ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES}) - - # set standard prefix - if(NOT DEFINED CGAL_EXT_LIB_${lib}_PREFIX) - set(CGAL_EXT_LIB_${lib}_PREFIX ${lib}) - endif() - hide_variable(CGAL_EXT_LIB_${lib}_PREFIX) - - # add option - list(FIND CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES "${lib}" POSITION) - if("${POSITION}" STRGREATER "-1") # if lib is essential - option(WITH_${lib} "Select external library ${lib}" ON) - else() - option(WITH_${lib} "Select external library ${lib}" OFF) - endif() - -endforeach() - #-------------------------------------------------------------------------------------------------- # # -= DEPENDENCIES =- @@ -688,27 +617,16 @@ endforeach() # The following variables are in the cache just so subdirectories can set them persistently. # But they are not intended to persist from run to run as normal cache variables. # Similar variables are created when a library is detected. -# -cache_set(CGAL_3RD_PARTY_PRECONFIGURED "") - cache_set(CGAL_3RD_PARTY_DEFINITIONS "") cache_set(CGAL_3RD_PARTY_INCLUDE_DIRS "") cache_set(CGAL_3RD_PARTY_LIBRARIES "") cache_set(CGAL_3RD_PARTY_LIBRARIES_DIRS "") -# default is on, but some use-cases need to set it to off, e.g., debian packages -option(CGAL_ENABLE_PRECONFIG - "Select to allow to preconfiguration of external libraries" ON) - # additional info: some header files in CGAL add additional code if # certain optional libs are installed, and some examples/tests rely on # this; e.g. in MPFI/RS in Algebraic_kernel_d. For these cases CGAL # and the example/test must be configured with MPFI (just one is not sufficient) -if(NOT CGAL_HEADER_ONLY) - include(CGAL_SetupDependencies) -endif() - message("== Detect external libraries (DONE) ==\n") #-------------------------------------------------------------------------------------------------- @@ -717,77 +635,6 @@ message("== Detect external libraries (DONE) ==\n") # #-------------------------------------------------------------------------------------------------- -if(NOT CGAL_HEADER_ONLY) - # The variables set are the #defines expected by compiler_config.h - # Note: CMake will not notice when files are added or removed - # but this is probably OK for the installation procedure. - - message("== Write compiler_config.h ==") - - macro(add_config_flag flag) - if(${flag}) - file(APPEND ${CMAKE_BINARY_DIR}/include/CGAL/compiler_config.h - "#define ${flag} 1\n\n") - else() - file(APPEND ${CMAKE_BINARY_DIR}/include/CGAL/compiler_config.h - "//#define ${flag} 1\n\n") - endif() - endmacro() - - if(NOT CMAKE_CROSSCOMPILING) - file(GLOB all_config_tests "${CGAL_MODULES_DIR}/config/testfiles/*.cpp") - list(SORT all_config_tests) - - file( - WRITE ${CMAKE_BINARY_DIR}/include/CGAL/compiler_config.h - "//\n// compiler_config.h is included by CGAL headers to load the needed compiler settings.\n//\n// DO NOT EDIT compiler_config.h. It is generated by CMake.\n//\n\n" - ) - - foreach(config_test_cpp ${all_config_tests}) - # Test's name is .cpp's base name - get_filename_component(config_test_name ${config_test_cpp} NAME_WE) - - # Compile and run ${config_test_cpp}. Exit code is stored in ${config_test_name}. - check_cxx_file_runs(${config_test_cpp} ${config_test_name} - ${config_test_name}) - if(${config_test_name}) - set(${config_test_name} 0) - else() - set(${config_test_name} 1) - endif() - - add_config_flag(${config_test_name} ${config_test_name}) - endforeach() - endif() - - add_config_flag(CGAL_USE_GMP) - add_config_flag(CGAL_USE_MPFR) - add_config_flag(CGAL_USE_GMPXX) - add_config_flag(CGAL_USE_LEDA) - add_config_flag(CGAL_USE_MPFI) - add_config_flag(CGAL_USE_RS) - add_config_flag(CGAL_USE_NTL) - - add_config_flag(CGAL_BUILD_SHARED_LIBS) - - if(NOT ${WITH_CGAL_Core}) - set(CGAL_USE_CORE FALSE) - else() - set(CGAL_USE_CORE ${CGAL_USE_GMP}) - endif() - add_config_flag(CGAL_USE_CORE) - # ^^ there is CGAL_USE_CORE and not CGAL_HAS_CORE, as CORE is considered - # as external lib and not as CGAL component (EBEB: 24 Jan 2012) - - if(RUNNING_CGAL_AUTO_TEST AND MSVC) - file(APPEND "${CMAKE_BINARY_DIR}/include/CGAL/compiler_config.h" - "#include \n\n") - endif() - - message("== Write compiler_config.h (DONE) ==\n") - -endif(NOT CGAL_HEADER_ONLY) - #-------------------------------------------------------------------------------------------------- # # -= Installation Setup =- @@ -863,18 +710,18 @@ endforeach() include_directories(${CGAL_INCLUDE_DIRS}) -cache_get(CGAL_3RD_PARTY_PRECONFIGURED) - -cache_get(CGAL_3RD_PARTY_DEFINITIONS) -cache_get(CGAL_3RD_PARTY_INCLUDE_DIRS) -cache_get(CGAL_3RD_PARTY_LIBRARIES) +cache_get(CGAL_3RD_PARTY_DEFINITIONS ) +cache_get(CGAL_3RD_PARTY_INCLUDE_DIRS ) +cache_get(CGAL_3RD_PARTY_LIBRARIES ) cache_get(CGAL_3RD_PARTY_LIBRARIES_DIRS) -add_subdirectory(src) +install(DIRECTORY "${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/" DESTINATION "${CGAL_INSTALL_INC_DIR}/CGAL/Qt" COMPONENT CGAL_Qt5) +install(DIRECTORY "${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/demo/resources/" DESTINATION "${CGAL_INSTALL_CMAKE_DIR}/demo/resources" COMPONENT CGAL_Qt5) +install(DIRECTORY "${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/demo/icons/" DESTINATION "${CGAL_INSTALL_CMAKE_DIR}/demo/icons" COMPONENT CGAL_Qt5) + # -# Variables used when WITH_{demos|examples|tests} are TRUE, and -# CGAL_HEADER_ONLY=ON +# Variables used when WITH_{demos|examples|tests} are TRUE # set(CGAL_USE_FILE ${CGAL_MODULES_DIR}/UseCGAL.cmake) get_property(CGAL_FOUND GLOBAL PROPERTY CGAL_FOUND) @@ -929,15 +776,10 @@ if(CGAL_BRANCH_BUILD AND CGAL_REPORT_DUPLICATE_FILES) endif() -if(NOT CGAL_HEADER_ONLY) - create_cgalconfig_files() -else() - configure_file("${CGAL_MODULES_DIR}/CGALConfig_binary_header_only.cmake.in" - "${CMAKE_BINARY_DIR}/CGALConfig.cmake" @ONLY) - configure_file( - "${CGAL_MODULES_DIR}/CGALConfigVersion_binary_header_only.cmake.in" - "${CMAKE_BINARY_DIR}/CGALConfigVersion.cmake" @ONLY) -endif() +configure_file("${CGAL_MODULES_DIR}/CGALConfig_binary_header_only.cmake.in" + "${CMAKE_BINARY_DIR}/CGALConfig.cmake" @ONLY) +configure_file("${CGAL_MODULES_DIR}/CGALConfigVersion_binary_header_only.cmake.in" + "${CMAKE_BINARY_DIR}/CGALConfigVersion.cmake" @ONLY) #-------------------------------------------------------------------------------------------------- # @@ -993,23 +835,17 @@ if(ZLIB_IN_AUXILIARY) install(DIRECTORY auxiliary/zlib/lib/ DESTINATION ${CGAL_INSTALL_LIB_DIR}) endif() -if(NOT CGAL_HEADER_ONLY) - install(FILES ${CMAKE_BINARY_DIR}/CGALConfigVersion.cmake - ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake - DESTINATION ${CGAL_INSTALL_CMAKE_DIR}) -else() - install( - FILES ${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfig.cmake - ${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfigBuildVersion.cmake - ${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfigVersion.cmake +install(FILES + ${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfig.cmake + ${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfigBuildVersion.cmake + ${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfigVersion.cmake + DESTINATION ${CGAL_INSTALL_CMAKE_DIR}) +if(NOT CGAL_INSTALL_CMAKE_DIR STREQUAL "${CGAL_INSTALL_LIB_DIR}/cmake/CGAL") + configure_file(${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfig-installation-dirs.cmake.in + ${CMAKE_BINARY_DIR}/config/CGALConfig-installation-dirs.cmake) + install(FILES + ${CMAKE_BINARY_DIR}/config/CGALConfig-installation-dirs.cmake DESTINATION ${CGAL_INSTALL_CMAKE_DIR}) - if(NOT CGAL_INSTALL_CMAKE_DIR STREQUAL "${CGAL_INSTALL_LIB_DIR}/cmake/CGAL") - configure_file( - ${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfig-installation-dirs.cmake.in - ${CMAKE_BINARY_DIR}/config/CGALConfig-installation-dirs.cmake) - install(FILES ${CMAKE_BINARY_DIR}/config/CGALConfig-installation-dirs.cmake - DESTINATION ${CGAL_INSTALL_CMAKE_DIR}) - endif() endif() if(CGAL_INSTALL_MAN_DIR) @@ -1284,89 +1120,65 @@ You must disable CGAL_ENABLE_CHECK_HEADERS.") -DDOXYGEN_EXECUTABLE=${DOXYGEN_EXECUTABLE} "${CMAKE_SOURCE_DIR}/Documentation/doc" WORKING_DIRECTORY "${DOC_DIR}") - execute_process(COMMAND "${CMAKE_COMMAND}" --build . --target "doc" - WORKING_DIRECTORY "${DOC_DIR}") + execute_process( + COMMAND + "${CMAKE_COMMAND}" --build . --target "doc" + WORKING_DIRECTORY "${DOC_DIR}" ) - #Get the list of the documented headers + #Get the list of the documented headers + file(GLOB html_files RELATIVE "${DOC_DIR}/doc_output/" "${DOC_DIR}/doc_output/*/*.html") + file(GLOB example_files RELATIVE "${CMAKE_SOURCE_DIR}/" "${CMAKE_SOURCE_DIR}/*/examples/*/*.cpp") + list(SORT example_files) - file( - GLOB html_files - RELATIVE "${DOC_DIR}/doc_output/" - "${DOC_DIR}/doc_output/*/*.html") - file( - GLOB example_files - RELATIVE "${CMAKE_SOURCE_DIR}/" - "${CMAKE_SOURCE_DIR}/*/examples/*/*.cpp") - find_program(AWK awk) - set(awk_arguments - [=[{ match($0, /# *include *(<|[<"])(CGAL\/[^>&"]*)([>"]|>)| (CGAL\/[^>&"]*\.h)/,arr); if(arr[2]!="") print arr[2]; if(arr[4]!="") print arr[4] }]=] - ) - message("listing headers from html files") - foreach(f ${html_files}) - execute_process( - COMMAND "${AWK}" "${awk_arguments}" "${DOC_DIR}/doc_output/${f}" - OUTPUT_VARIABLE tmp_list) - if(NOT "${tmp_list}" STREQUAL "") - string(REPLACE "\n" ";" tmp_list ${tmp_list}) - list(APPEND list_of_documented_headers ${tmp_list}) - endif() - endforeach() - message("listing headers from examples files") - foreach(f ${example_files}) - execute_process( - COMMAND "${AWK}" "${awk_arguments}" "${CMAKE_SOURCE_DIR}/${f}" - OUTPUT_VARIABLE tmp_list) - if(NOT "${tmp_list}" STREQUAL "") - string(REPLACE "\n" ";" tmp_list ${tmp_list}) - list(APPEND list_of_documented_headers ${tmp_list}) - endif() - endforeach() - message("removing duplicates:") - list(REMOVE_DUPLICATES list_of_documented_headers) - message("sorting:") - list(SORT list_of_documented_headers) - #string(REPLACE ";" " \n" list_of_documented_headers "${list_of_documented_headers}") - if(NOT "${list_of_documented_headers}" STREQUAL "") - set(has_list_of_documented_headers TRUE) - else() - set(has_list_of_documented_headers FALSE) + find_program(AWK awk) + set(awk_arguments [=[{ match($0, /# *include *(<|[<"])(CGAL\/[^>&"]*)([>"]|>)| (CGAL\/[^>&"]*\.h)/,arr); if(arr[2]!="") print arr[2]; if(arr[4]!="") print arr[4] }]=]) + message("listing headers from html files") + foreach(f ${html_files}) + execute_process(COMMAND "${AWK}" "${awk_arguments}" "${DOC_DIR}/doc_output/${f}" + OUTPUT_VARIABLE tmp_list) + if (NOT "${tmp_list}" STREQUAL "") + string(REPLACE "\n" ";" tmp_list ${tmp_list}) + LIST( APPEND list_of_documented_headers ${tmp_list}) endif() - include( - ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/list_of_whitelisted_headers.cmake - OPTIONAL - RESULT_VARIABLE has_list_of_whitelisted_headers) + endforeach() + + message("listing headers from examples files") + foreach(f ${example_files}) + execute_process(COMMAND "${AWK}" "${awk_arguments}" "${CMAKE_SOURCE_DIR}/${f}" + OUTPUT_VARIABLE tmp_list) + if (NOT "${tmp_list}" STREQUAL "") + string(REPLACE "\n" ";" tmp_list ${tmp_list}) + LIST( APPEND list_of_documented_headers ${tmp_list}) + endif() + endforeach() + message("removing duplicates:") + list(REMOVE_DUPLICATES list_of_documented_headers) + message("sorting:") + list(SORT list_of_documented_headers) + #string(REPLACE ";" " \n" list_of_documented_headers "${list_of_documented_headers}") + list(SORT list_of_documented_headers) + list(REMOVE_DUPLICATES list_of_documented_headers) + + include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/list_of_whitelisted_headers.cmake + OPTIONAL RESULT_VARIABLE has_list_of_whitelisted_headers) message("list_of_whitelisted_headers: ${list_of_whitelisted_headers}") ## Loop on package and headers set(check_pkg_target_list) - if(POLICY CMP0057) - cmake_policy(SET CMP0057 NEW) - endif() #get build dir for removal from deps get_filename_component(BUILD_DIR ${CMAKE_BINARY_DIR} NAME) foreach(package ${CGAL_CONFIGURED_PACKAGES_NAMES}) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include) set(check_pkg_headers_depends "") - if(has_list_of_documented_headers AND POLICY CMP0057) - # Then recurse2 - file( - GLOB_RECURSE ${package}_HEADERS - RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include" - "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/CGAL/*.h*") - else() # do not recurse - file( - GLOB ${package}_HEADERS - RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include" - "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/CGAL/*.h*") - endif() + file(GLOB_RECURSE ${package}_HEADERS #don't use a hard coded list because the ones for the documented headers is enough. + RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include" + "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/CGAL/*.h*") + list(SORT ${package}_HEADERS) foreach(header ${${package}_HEADERS}) set(skip_hdr FALSE) - if(POLICY CMP0057) - if(has_list_of_documented_headers AND NOT header IN_LIST - list_of_documented_headers) - # message(STATUS "Skip non-documented header \"${header}\".") - set(skip_hdr TRUE) - endif() + if(NOT header IN_LIST list_of_documented_headers) +# message(STATUS "Skip non-documented header \"${header}\".") + set(skip_hdr TRUE) endif() if(NOT VTK_FOUND) string(REGEX MATCH ".*vtk.*" is_a_vtk_header ${header}) @@ -1382,12 +1194,10 @@ VTK_FOUND is false.") LEDA_FOUND is false.") set(skip_hdr TRUE) endif() - if(POLICY CMP0057) - if(has_list_of_whitelisted_headers AND header IN_LIST - list_of_whitelisted_headers) - message(STATUS "Skip whitelisted header \"${header}\".") - set(skip_hdr TRUE) - endif() + if(has_list_of_whitelisted_headers + AND header IN_LIST list_of_whitelisted_headers) + message(STATUS "Skip whitelisted header \"${header}\".") + set(skip_hdr TRUE) endif() if(NOT skip_hdr) list(APPEND list_of_headers_to_test ${header}) @@ -1456,7 +1266,6 @@ ${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/${header}" list(REMOVE_DUPLICATES packages_deps) endif() endforeach() # loop on packages - #Now check that a cpp file including all documented headers compiles file(WRITE ${CGAL_BINARY_DIR}/test_headers.cpp "#define BOOST_PARAMETER_MAX_ARITY 12 \n") diff --git a/Installation/cmake/modules/CGAL_Common.cmake b/Installation/cmake/modules/CGAL_Common.cmake index ed1fe54ad0c..c9c61644d23 100644 --- a/Installation/cmake/modules/CGAL_Common.cmake +++ b/Installation/cmake/modules/CGAL_Common.cmake @@ -24,17 +24,6 @@ if( NOT CGAL_COMMON_FILE_INCLUDED ) set( CMAKE_2_6_3_OR_ABOVE FALSE ) endif() - if ( CGAL_BUILDING_LIBS ) - option(BUILD_SHARED_LIBS "Build shared libraries" ON) - set(CGAL_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) - - if ( BUILD_SHARED_LIBS ) - message( STATUS "Building shared libraries" ) - else() - message( STATUS "Building static libraries" ) - endif() - endif() - if ( WIN32 ) find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin ) if(CMAKE_UNAME) diff --git a/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake b/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake index 323beea99f8..161e59d0391 100644 --- a/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake +++ b/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake @@ -57,6 +57,12 @@ function(create_single_source_cgal_program firstfile ) set(NO_TESTING TRUE) endif() + if(NOT NO_TESTING) + cgal_add_test(${exe_name}) + else() + cgal_add_test(${exe_name} NO_EXECUTION) + endif() + add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${exe_name} ) target_link_libraries(${exe_name} PRIVATE CGAL::CGAL) diff --git a/Installation/cmake/modules/CGAL_Macros.cmake b/Installation/cmake/modules/CGAL_Macros.cmake index 2a937ee19e0..f619cd32950 100644 --- a/Installation/cmake/modules/CGAL_Macros.cmake +++ b/Installation/cmake/modules/CGAL_Macros.cmake @@ -290,10 +290,9 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) # To deal with imported targets of Qt5 and Boost, when CGAL # targets are themselves imported by another project. - if(NOT CGAL_BUILDING_LIBS) - if (${component} STREQUAL "Qt5") - find_package(Qt5 COMPONENTS OpenGL Gui Core Script ScriptTools QUIET) - endif() + + if (${component} STREQUAL "Qt5") + find_package(Qt5 COMPONENTS OpenGL Gui Core Script ScriptTools QUIET) endif() else(WITH_CGAL_${component}) @@ -308,9 +307,8 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) set( vlib "${CGAL_EXT_LIB_${component}_PREFIX}" ) - if ( NOT CGAL_IGNORE_PRECONFIGURED_${component} AND ${vlib}_FOUND) + if (${vlib}_FOUND) - ####message( STATUS "External library ${component} has been preconfigured") use_lib( ${component} ${${vlib}_USE_FILE}) else() @@ -334,45 +332,6 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) endmacro() - macro( use_essential_libs ) - - # Comment: This is subject to be changed in the future - # - either more specific (giving precise include_dir- and link-order) - # - or even less specific if order becomes less relevant - # Eric Berberich 2012/06/29 - - if(NOT CGAL_DISABLE_GMP) - if(RS_FOUND) - use_component( RS ) - endif() - - if(MPFI_FOUND) - use_component( MPFI ) - endif() - - if(MPFR_FOUND) - use_component( MPFR ) - endif() - - if (GMPXX_FOUND) - use_component( GMPXX ) - endif() - - if(GMP_FOUND) - use_component( GMP ) - endif() - endif(NOT CGAL_DISABLE_GMP) - - if(LEDA_FOUND) - use_component( LEDA ) - endif() - - if(NTL_FOUND) - use_component( NTL ) - endif() - endmacro() - - function( cgal_setup_module_path ) # Avoid to modify the modules path twice if(NOT CGAL_MODULE_PATH_IS_SET) @@ -408,35 +367,6 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "${SPECIAL_PREFIXES}\n") file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "${SPECIAL_PREFIXES}") - foreach( lib ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES} ) - - list( FIND CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES "${lib}" POSITION ) - # if lib is essential or preconfiguration for an activated library ... - if ( ("${POSITION}" STRGREATER "-1") OR ( CGAL_ENABLE_PRECONFIG AND WITH_${lib} )) - - set (vlib ${CGAL_EXT_LIB_${lib}_PREFIX} ) - #the next 'if' is needed to avoid ${vlib} config variables to be overidden in case of a local configuration change - file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "if (NOT CGAL_IGNORE_PRECONFIGURED_${lib})\n") - file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake " set( ${vlib}_FOUND \"${${vlib}_FOUND}\" )\n") - file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake " set( ${vlib}_USE_FILE \"${${vlib}_USE_FILE}\" )\n") - file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake " set( ${vlib}_INCLUDE_DIR \"${${vlib}_INCLUDE_DIR}\" )\n") - file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake " set( ${vlib}_LIBRARIES \"${${vlib}_LIBRARIES}\" )\n") - file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake " set( ${vlib}_DEFINITIONS \"${${vlib}_DEFINITIONS}\" )\n") - file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "endif()\n\n") - - - #the next 'if' is needed to avoid ${vlib} config variables to be overidden in case of a local configuration change - file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "if (NOT CGAL_IGNORE_PRECONFIGURED_${lib})\n") - file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake " set( ${vlib}_FOUND \"${${vlib}_FOUND}\")\n") - file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake " set( ${vlib}_USE_FILE \"${${vlib}_USE_FILE}\" )\n") - file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake " set( ${vlib}_INCLUDE_DIR \"${${vlib}_INCLUDE_DIR}\" )\n") - file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake " set( ${vlib}_LIBRARIES \"${${vlib}_LIBRARIES}\" )\n") - file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake " set( ${vlib}_DEFINITIONS \"${${vlib}_DEFINITIONS}\" )\n") - file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "endif()\n\n") - endif() - - endforeach() - endmacro() macro ( fetch_env_var VAR ) diff --git a/Installation/cmake/modules/CGAL_Qt5_moc_and_resource_files.cmake b/Installation/cmake/modules/CGAL_Qt5_moc_and_resource_files.cmake index 2ff6bb7276a..f3d4f23dc21 100644 --- a/Installation/cmake/modules/CGAL_Qt5_moc_and_resource_files.cmake +++ b/Installation/cmake/modules/CGAL_Qt5_moc_and_resource_files.cmake @@ -2,24 +2,6 @@ if(CGAL_Qt5_moc_and_resource_files_included) return() endif() set(CGAL_Qt5_moc_and_resource_files_included TRUE) - -if(NOT CGAL_HEADER_ONLY AND CGAL_BUILDING_LIBS) - qt5_wrap_cpp(_CGAL_Qt5_MOC_FILES_private - ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsViewNavigation.h - ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/DemosMainWindow.h - ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsItem.h - ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsViewInput.h - ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/camera.h - ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/frame.h - ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/keyFrameInterpolator.h - ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/manipulatedCameraFrame.h - ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/manipulatedFrame.h - ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/qglviewer.h - ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/image_interface.h - TARGET CGAL_Qt5 - ) -endif()#CGAL_HEADER_ONLY - # qrc files (resources files, that contain icons, at least) if(EXISTS ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/demo/resources/CGAL.qrc) qt5_add_resources (_CGAL_Qt5_RESOURCE_FILES_private diff --git a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake index 6590e31f940..0745228def8 100644 --- a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake @@ -23,11 +23,6 @@ # If set, the `LEDA` library will be searched and used to provide # the exact number types used by CGAL kernels. # -# .. variable:: CGAL_HEADER_ONLY -# -# Set this variable if you are using the CGAL libraries as -# header-only libraries. -# if(CGAL_SetupCGALDependencies_included) return() endif() @@ -72,56 +67,47 @@ endif() # # Link the target with the dependencies of CGAL:: # -# CGAL_setup_CGAL_dependencies( target [INTERFACE] ) +# CGAL_setup_CGAL_dependencies( target ) # -# If the option ``INTERFACE`` is passed, the dependencies are +# The dependencies are # added using :command:`target_link_libraries` with the ``INTERFACE`` -# keyword, or ``PUBLIC`` otherwise. +# keyword. # function(CGAL_setup_CGAL_dependencies target) - if(ARGV1 STREQUAL INTERFACE) - set(keyword INTERFACE) - else() - set(keyword PUBLIC) - endif() if(CGAL_DISABLE_GMP) - target_compile_definitions(${target} ${keyword} CGAL_DISABLE_GMP=1) + target_compile_definitions(${target} INTERFACE CGAL_DISABLE_GMP=1) else() - use_CGAL_GMP_support(${target} ${keyword}) + use_CGAL_GMP_support(${target} INTERFACE) set(CGAL_USE_GMP TRUE CACHE INTERNAL "CGAL library is configured to use GMP") set(CGAL_USE_MPFR TRUE CACHE INTERNAL "CGAL library is configured to use MPFR") endif() if(WITH_LEDA) - use_CGAL_LEDA_support(${target} ${keyword}) - endif() - - if (NOT CGAL_HEADER_ONLY) - target_compile_definitions(${target} ${keyword} CGAL_NOT_HEADER_ONLY=1) + use_CGAL_LEDA_support(${target} INTERFACE) endif() if (RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) - target_compile_definitions(${target} ${keyword} CGAL_TEST_SUITE=1) + target_compile_definitions(${target} INTERFACE CGAL_TEST_SUITE=1) endif() # CGAL now requires C++14. `decltype(auto)` is used as a marker of # C++14. - target_compile_features(${target} ${keyword} cxx_decltype_auto) + target_compile_features(${target} INTERFACE cxx_decltype_auto) - use_CGAL_Boost_support(${target} ${keyword}) + use_CGAL_Boost_support(${target} INTERFACE) foreach(dir ${CGAL_INCLUDE_DIRS}) - target_include_directories(${target} ${keyword} + target_include_directories(${target} INTERFACE $) endforeach() - target_include_directories(${target} ${keyword} + target_include_directories(${target} INTERFACE $) # Now setup compilation flags if(MSVC) - target_compile_options(${target} ${keyword} + target_compile_options(${target} INTERFACE "-D_SCL_SECURE_NO_DEPRECATE;-D_SCL_SECURE_NO_WARNINGS") if(CMAKE_VERSION VERSION_LESS 3.11) - target_compile_options(${target} ${keyword} + target_compile_options(${target} INTERFACE /fp:strict /fp:except- /wd4503 # Suppress warnings C4503 about "decorated name length exceeded" @@ -129,7 +115,7 @@ function(CGAL_setup_CGAL_dependencies target) ) else() # The MSVC generator supports `$` since CMake 3.11. - target_compile_options(${target} ${keyword} + target_compile_options(${target} INTERFACE $<$:/fp:strict> $<$:/fp:except-> $<$:/wd4503> # Suppress warnings C4503 about "decorated name length exceeded" @@ -140,39 +126,39 @@ function(CGAL_setup_CGAL_dependencies target) if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.0.3) message(STATUS "Apple Clang version ${CMAKE_CXX_COMPILER_VERSION} compiler detected") message(STATUS "Boost MP is turned off for all Apple Clang versions below 11.0.3!") - target_compile_options(${target} ${keyword} "-DCGAL_DO_NOT_USE_BOOST_MP") + target_compile_options(${target} INTERFACE "-DCGAL_DO_NOT_USE_BOOST_MP") endif() elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") message( STATUS "Using Intel Compiler. Adding -fp-model strict" ) if(WIN32) - target_compile_options(${target} ${keyword} "/fp:strict") + target_compile_options(${target} INTERFACE "/fp:strict") else() - target_compile_options(${target} ${keyword} "-fp-model" "strict") + target_compile_options(${target} INTERFACE "-fp-model" "strict") endif() elseif(CMAKE_CXX_COMPILER_ID MATCHES "SunPro") message( STATUS "Using SunPro compiler, using STLPort 4." ) - target_compile_options(${target} ${keyword} + target_compile_options(${target} INTERFACE "-features=extensions;-library=stlport4;-D_GNU_SOURCE") - target_link_libraries(${target} ${keyword} "-library=stlport4") + target_link_libraries(${target} INTERFACE "-library=stlport4") elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") if ( RUNNING_CGAL_AUTO_TEST ) - target_compile_options(${target} ${keyword} "-Wall") + target_compile_options(${target} INTERFACE "-Wall") endif() if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3) message( STATUS "Using gcc version 4 or later. Adding -frounding-math" ) if(CMAKE_VERSION VERSION_LESS 3.3) - target_compile_options(${target} ${keyword} "-frounding-math") + target_compile_options(${target} INTERFACE "-frounding-math") else() - target_compile_options(${target} ${keyword} "$<$:-frounding-math>") + target_compile_options(${target} INTERFACE "$<$:-frounding-math>") endif() endif() if ( "${GCC_VERSION}" MATCHES "^4.2" ) message( STATUS "Using gcc version 4.2. Adding -fno-strict-aliasing" ) - target_compile_options(${target} ${keyword} "-fno-strict-aliasing" ) + target_compile_options(${target} INTERFACE "-fno-strict-aliasing" ) endif() if ( "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "alpha" ) message( STATUS "Using gcc on alpha. Adding -mieee -mfp-rounding-mode=d" ) - target_compile_options(${target} ${keyword} "-mieee" "-mfp-rounding-mode=d" ) + target_compile_options(${target} INTERFACE "-mieee" "-mfp-rounding-mode=d" ) endif() endif() endfunction() diff --git a/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake index 51c6bc73c4f..3387eae26c8 100644 --- a/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake @@ -46,22 +46,16 @@ endif() # # Link the target with the dependencies of `CGAL_Core`:: # -# CGAL_setup_CGAL_Core_dependencies( target [INTERFACE] ) +# CGAL_setup_CGAL_Core_dependencies( target) # -# If the option ``INTERFACE`` is passed, the dependencies are +# The dependencies are # added using :command:`target_link_libraries` with the ``INTERFACE`` -# keyword, or ``PUBLIC`` otherwise. +# keyword. # function(CGAL_setup_CGAL_Core_dependencies target) - if(ARGV1 STREQUAL INTERFACE) - set(keyword INTERFACE) - else() - set(keyword PUBLIC) - endif() - - use_CGAL_GMP_support(CGAL_Core ${keyword}) - target_compile_definitions(${target} ${keyword} CGAL_USE_CORE=1) - target_link_libraries( CGAL_Core ${keyword} CGAL::CGAL ) + use_CGAL_GMP_support(CGAL_Core INTERFACE) + target_compile_definitions(${target} INTERFACE CGAL_USE_CORE=1) + target_link_libraries( CGAL_Core INTERFACE CGAL::CGAL ) endfunction() diff --git a/Installation/cmake/modules/CGAL_SetupCGAL_ImageIODependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGAL_ImageIODependencies.cmake index 8ac856d0373..fd1d2bd7f2a 100644 --- a/Installation/cmake/modules/CGAL_SetupCGAL_ImageIODependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGAL_ImageIODependencies.cmake @@ -51,22 +51,14 @@ set(CGAL_ImageIO_FOUND TRUE) set_property(GLOBAL PROPERTY CGAL_ImageIO_FOUND TRUE) function(CGAL_setup_CGAL_ImageIO_dependencies target) - if(ARGV1 STREQUAL INTERFACE) - set(keyword INTERFACE) - else() - set(keyword PUBLIC) - endif() - target_link_libraries( CGAL_ImageIO ${keyword} CGAL::CGAL) + target_link_libraries( CGAL_ImageIO INTERFACE CGAL::CGAL) if(ZLIB_FOUND) - target_include_directories( CGAL_ImageIO SYSTEM ${keyword} ${ZLIB_INCLUDE_DIRS}) - target_link_libraries( CGAL_ImageIO ${keyword} ${ZLIB_LIBRARIES}) + target_include_directories( CGAL_ImageIO SYSTEM INTERFACE ${ZLIB_INCLUDE_DIRS}) + target_link_libraries( CGAL_ImageIO INTERFACE ${ZLIB_LIBRARIES}) - target_compile_definitions( CGAL_ImageIO ${keyword} CGAL_USE_ZLIB=1) - if(NOT ARGV1 STREQUAL INTERFACE) - set_target_properties(CGAL_ImageIO PROPERTIES CGAL_TARGET_USES_ZLIB TRUE) - endif() + target_compile_definitions( CGAL_ImageIO INTERFACE CGAL_USE_ZLIB=1) else() message( STATUS "NOTICE: libCGAL_ImageIO needs ZLib to read compressed files. That feature will not be activated.") endif() diff --git a/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake index 2cdc190f75a..1bd28be9865 100644 --- a/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake @@ -54,9 +54,9 @@ if(NOT CGAL_Qt5_MISSING_DEPS) include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Qt5_moc_and_resource_files.cmake) - if(CGAL_HEADER_ONLY AND (WITH_demos OR WITH_examples OR WITH_tests OR NOT CGAL_BUILDING_LIBS) AND NOT TARGET CGAL_Qt5_moc_and_resources) - add_library(CGAL_Qt5_moc_and_resources STATIC - ${_CGAL_Qt5_MOC_FILES_private} + if(NOT TARGET CGAL_Qt5_moc_and_resources) + add_library(CGAL_Qt5_moc_and_resources STATIC + ${_CGAL_Qt5_MOC_FILES_private} ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsViewNavigation.h ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/DemosMainWindow.h ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsItem.h @@ -99,33 +99,26 @@ endif() # # Link the target with the dependencies of `CGAL_Qt5`:: # -# CGAL_setup_CGAL_Qt5_dependencies( target [INTERFACE] ) +# CGAL_setup_CGAL_Qt5_dependencies( target ) # -# If the option ``INTERFACE`` is passed, the dependencies are +# The dependencies are # added using :command:`target_link_libraries` with the ``INTERFACE`` -# keyword, or ``PUBLIC`` otherwise. +# keyword. # function(CGAL_setup_CGAL_Qt5_dependencies target) - if(ARGV1 STREQUAL INTERFACE) - set(keyword INTERFACE) - else() - set(keyword PUBLIC) - endif() if($ENV{CGAL_FAKE_PUBLIC_RELEASE}) - target_compile_definitions( ${target} ${keyword} CGAL_FAKE_PUBLIC_RELEASE=1 ) + target_compile_definitions( ${target} INTERFACE CGAL_FAKE_PUBLIC_RELEASE=1 ) endif() - target_link_libraries( ${target} ${keyword} CGAL::CGAL) - if(CGAL_HEADER_ONLY) - target_link_libraries( ${target} ${keyword} CGAL::Qt5_moc_and_resources) - endif() - target_link_libraries( ${target} ${keyword} Qt5::OpenGL Qt5::Svg Qt5::Xml) + target_link_libraries( ${target} INTERFACE CGAL::CGAL) + target_link_libraries( ${target} INTERFACE CGAL::Qt5_moc_and_resources) + target_link_libraries( ${target} INTERFACE Qt5::OpenGL Qt5::Svg Qt5::Xml) # Remove -Wdeprecated-copy, for g++ >= 9.0, because Qt5, as of # version 5.12, has a lot of [-Wdeprecated-copy] warnings. if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9" ) - target_compile_options( ${target} ${keyword} "-Wno-deprecated-copy" "-Wno-cast-function-type" ) + target_compile_options( ${target} INTERFACE "-Wno-deprecated-copy" "-Wno-cast-function-type" ) endif() endfunction() diff --git a/Installation/cmake/modules/CGAL_SetupDependencies.cmake b/Installation/cmake/modules/CGAL_SetupDependencies.cmake index 1c0135b155a..6051c7d3ce4 100644 --- a/Installation/cmake/modules/CGAL_SetupDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupDependencies.cmake @@ -1,77 +1,5 @@ include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Macros.cmake) -message ( STATUS "External libraries supported: ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES}") - -foreach (lib ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES}) - - # Part 1: Try to find lib - - set (vlib "${CGAL_EXT_LIB_${lib}_PREFIX}") - - # Check whether lib is essential or WITH_ is given: - - list(FIND CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES "${lib}" POSITION) - - if ("${POSITION}" STRGREATER "-1" OR WITH_${lib}) - - # In both cases CGAL_USE_ will be finally set. - - #message (STATUS "With ${lib} given or essential: pos=${POSITION}") - - if ( CGAL_ENABLE_PRECONFIG ) - message (STATUS "Preconfiguring library: ${lib} ...") - else() - message (STATUS "Configuring library: ${lib} ...") - endif() - - find_package( ${lib} ) - - if ( ${vlib}_FOUND ) - if ( CGAL_ENABLE_PRECONFIG ) - message( STATUS "${lib} has been preconfigured:") - message( STATUS " Use${lib}-file: ${${vlib}_USE_FILE}") - message( STATUS " ${lib} include: ${${vlib}_INCLUDE_DIR}" ) - message( STATUS " ${lib} libraries: ${${vlib}_LIBRARIES}" ) - message( STATUS " ${lib} definitions: ${${vlib}_DEFINITIONS}" ) - else() - message( STATUS "${lib} has been configured") - use_lib( ${vlib} ${${vlib}_USE_FILE}) - endif() - - # TODO EBEB what about Qt5, zlib etc? - set ( CGAL_USE_${vlib} TRUE ) - - - # Part 2: Add some lib-specific definitions or obtain version - - if (${lib} STREQUAL "GMP") - get_dependency_version(GMP) - endif() - - if (${lib} STREQUAL "MPFR") - set( MPFR_DEPENDENCY_INCLUDE_DIR ${GMP_INCLUDE_DIR} ) - set( MPFR_DEPENDENCY_LIBRARIES ${GMP_LIBRARIES} ) - get_dependency_version(MPFR) - endif() - - if (${lib} STREQUAL "LEDA") - # special case for LEDA - add a flag - message( STATUS "LEDA cxx flags: ${LEDA_CXX_FLAGS}" ) - uniquely_add_flags( CMAKE_CXX_FLAGS ${LEDA_CXX_FLAGS} ) - endif() - - else() - - if ("${POSITION}" STRGREATER "-1") # if lib is essential - message( FATAL_ERROR "CGAL requires ${lib} to be found" ) - endif() - - endif() - - endif() - -endforeach() - if( (GMP_FOUND AND NOT MPFR_FOUND) OR (NOT GMP_FOUND AND MPFR_FOUND) ) message( FATAL_ERROR "CGAL needs for its full functionality both GMP and MPFR.") endif() diff --git a/Installation/cmake/modules/CGAL_SetupFlags.cmake b/Installation/cmake/modules/CGAL_SetupFlags.cmake index 9037edc6a5e..514ad5c58c8 100644 --- a/Installation/cmake/modules/CGAL_SetupFlags.cmake +++ b/Installation/cmake/modules/CGAL_SetupFlags.cmake @@ -6,12 +6,12 @@ if ( NOT CGAL_SETUP_FLAGS_INCLUDED ) # override the flags used to build the libraries # set( CGAL_DONT_OVERRIDE_CMAKE_FLAGS_DESCRIPTION - "Set this to TRUE if you want to define or modify any of CMAKE_*_FLAGS. When this is FALSE, all the CMAKE_*_FLAGS flags are overriden with the values used when building the CGAL libs. For CGAL_*_flags (used for ADDITIONAL flags) , there is no need to set this to TRUE." + "Set this to TRUE if you want to define or modify any of CMAKE_*_FLAGS. When this is FALSE, all the CMAKE_*_FLAGS flags are overriden with the values used when building the CGAL libs. For CGAL_*_flags (used for ADDITIONAL flags) , there is no need to set this to TRUE." ) -option( CGAL_DONT_OVERRIDE_CMAKE_FLAGS +option( CGAL_DONT_OVERRIDE_CMAKE_FLAGS ${CGAL_DONT_OVERRIDE_CMAKE_FLAGS_DESCRIPTION} - FALSE + FALSE ) if ( CGAL_CONFIG_LOADED AND NOT CGAL_DONT_OVERRIDE_CMAKE_FLAGS ) @@ -19,18 +19,14 @@ if ( CGAL_CONFIG_LOADED AND NOT CGAL_DONT_OVERRIDE_CMAKE_FLAGS ) typed_cache_set ( STRING "Build type: Release, Debug, RelWithDebInfo or MinSizeRel" CMAKE_BUILD_TYPE "${CGAL_BUILD_TYPE_INIT}" ) string( TOUPPER "${CMAKE_BUILD_TYPE}" CGAL_BUILD_TYPE_UPPER ) - - if ( CGAL_BUILD_SHARED_LIBS ) - set( CGAL_LINKER_FLAGS_TYPE SHARED ) - else() - set( CGAL_LINKER_FLAGS_TYPE MODULE ) - endif() - + + set( CGAL_LINKER_FLAGS_TYPE MODULE ) + typed_cache_set ( STRING "C++ compiler flags for all build types" CMAKE_CXX_FLAGS "${CGAL_CXX_FLAGS_INIT}" ) typed_cache_set ( STRING "C++ compiler flags for ${CGAL_BUILD_TYPE_UPPER}" CMAKE_CXX_FLAGS_${CGAL_BUILD_TYPE_UPPER} "${CGAL_CXX_FLAGS_${CGAL_BUILD_TYPE_UPPER}_INIT}" ) typed_cache_set ( STRING "Linker flags for all build types" CMAKE_EXE_LINKER_FLAGS "${CGAL_${CGAL_LINKER_FLAGS_TYPE}_LINKER_FLAGS_INIT}" ) typed_cache_set ( STRING "Linker flags for ${CGAL_BUILD_TYPE_UPPER}" CMAKE_EXE_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER} "${CGAL_${CGAL_LINKER_FLAGS_TYPE}_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}_INIT}" ) - + endif() typed_cache_set( BOOL ${CGAL_DONT_OVERRIDE_CMAKE_FLAGS_DESCRIPTION} CGAL_DONT_OVERRIDE_CMAKE_FLAGS TRUE ) @@ -68,15 +64,7 @@ string( TOUPPER "${CMAKE_BUILD_TYPE}" CGAL_BUILD_TYPE_UPPER ) message( STATUS "USING CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" ) -if ( CGAL_BUILDING_LIBS ) - if ( BUILD_SHARED_LIBS ) - message( STATUS "USING LDFLAGS = '${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" ) - else() - message( STATUS "USING LDFLAGS = '${CMAKE_STATIC_LINKER_FLAGS} ${CMAKE_STATIC_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" ) - endif() -else() - message( STATUS "USING EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" ) -endif() +message( STATUS "USING EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" ) endif() diff --git a/Installation/cmake/modules/CGAL_SetupGMP.cmake b/Installation/cmake/modules/CGAL_SetupGMP.cmake index 6627df01796..4a1df74eabc 100644 --- a/Installation/cmake/modules/CGAL_SetupGMP.cmake +++ b/Installation/cmake/modules/CGAL_SetupGMP.cmake @@ -46,34 +46,29 @@ endif() # keyword, or ``PUBLIC`` otherwise. function(use_CGAL_GMP_support target) - if(ARGV1 STREQUAL INTERFACE) - set(keyword INTERFACE) - else() - set(keyword PUBLIC) - endif() if(NOT GMP_FOUND OR NOT MPFR_FOUND) message(FATAL_ERROR "CGAL requires GMP and MPFR.") return() endif() if(NOT GMP_INCLUDE_DIR STREQUAL "${CGAL_INSTALLATION_PACKAGE_DIR}/auxiliary/gmp/include") - target_include_directories(${target} SYSTEM ${keyword} ${GMP_INCLUDE_DIR}) + target_include_directories(${target} SYSTEM INTERFACE ${GMP_INCLUDE_DIR}) else() - target_include_directories(${target} SYSTEM ${keyword} + target_include_directories(${target} SYSTEM INTERFACE $ $) endif() if(NOT MPFR_INCLUDE_DIR STREQUAL "${CGAL_INSTALLATION_PACKAGE_DIR}/auxiliary/gmp/include") - target_include_directories(${target} SYSTEM ${keyword} ${MPFR_INCLUDE_DIR}) + target_include_directories(${target} SYSTEM INTERFACE ${MPFR_INCLUDE_DIR}) else() - target_include_directories(${target} SYSTEM ${keyword} + target_include_directories(${target} SYSTEM INTERFACE $ $) endif() if(WITH_GMPXX OR CGAL_WITH_GMPXX) - target_include_directories(${target} SYSTEM ${keyword} ${GMPXX_INCLUDE_DIR}) - target_link_libraries(${target} ${keyword} ${GMPXX_LIBRARIES}) - target_compile_definitions(${target} ${keyword} CGAL_USE_GMPXX=1) + target_include_directories(${target} SYSTEM INTERFACE ${GMPXX_INCLUDE_DIR}) + target_link_libraries(${target} INTERFACE ${GMPXX_LIBRARIES}) + target_compile_definitions(${target} INTERFACE CGAL_USE_GMPXX=1) endif() - target_link_libraries(${target} ${keyword} ${MPFR_LIBRARIES} ${GMP_LIBRARIES}) + target_link_libraries(${target} INTERFACE ${MPFR_LIBRARIES} ${GMP_LIBRARIES}) endfunction() diff --git a/Installation/cmake/modules/CGAL_SetupLEDA.cmake b/Installation/cmake/modules/CGAL_SetupLEDA.cmake index 72688b361ec..af207540058 100644 --- a/Installation/cmake/modules/CGAL_SetupLEDA.cmake +++ b/Installation/cmake/modules/CGAL_SetupLEDA.cmake @@ -32,11 +32,6 @@ find_package(LEDA) # keyword, or ``PUBLIC`` otherwise. function(use_CGAL_LEDA_support target) - if(ARGV1 STREQUAL INTERFACE) - set(keyword INTERFACE) - else() - set(keyword PUBLIC) - endif() if(NOT LEDA_FOUND) message(FATAL_ERROR "use_CGAL_LEDA_support is use whereas LEDA_FOUND is false.") return() @@ -45,12 +40,12 @@ function(use_CGAL_LEDA_support target) separate_arguments(LIST_LEDA_DEFINITIONS UNIX_COMMAND "${LEDA_DEFINITIONS} -DCGAL_USE_LEDA") if(CMAKE_VERSION VERSION_LESS 3.3) - target_compile_options(${target} ${keyword} ${LIST_LEDA_CXX_FLAGS}) + target_compile_options(${target} INTERFACE ${LIST_LEDA_CXX_FLAGS}) else() - target_compile_options(${target} ${keyword} $<$:${LIST_LEDA_CXX_FLAGS}>) + target_compile_options(${target} INTERFACE $<$:${LIST_LEDA_CXX_FLAGS}>) endif() - target_compile_options(${target} ${keyword} ${LIST_LEDA_DEFINITIONS}) + target_compile_options(${target} INTERFACE ${LIST_LEDA_DEFINITIONS}) - target_include_directories(${target} SYSTEM ${keyword} ${LEDA_INCLUDE_DIR}) - target_link_libraries(${target} ${keyword} ${LEDA_LIBRARIES} ${LEDA_LINKER_FLAGS}) + target_include_directories(${target} SYSTEM INTERFACE ${LEDA_INCLUDE_DIR}) + target_link_libraries(${target} INTERFACE ${LEDA_LIBRARIES} ${LEDA_LINKER_FLAGS}) endfunction() diff --git a/Installation/cmake/modules/CGAL_UseMPFI.cmake b/Installation/cmake/modules/CGAL_UseMPFI.cmake index c19a0d5ff36..186f807e1f9 100644 --- a/Installation/cmake/modules/CGAL_UseMPFI.cmake +++ b/Installation/cmake/modules/CGAL_UseMPFI.cmake @@ -3,7 +3,7 @@ if( MPFI_FOUND AND NOT MPFI_SETUP ) - if (GMP_FOUND AND MPFR_FOUND) + if (GMP_FOUND AND MPFR_FOUND) message( STATUS "UseMPFI" ) message( STATUS "MPFI include: ${MPFI_INCLUDE_DIR}" ) @@ -30,11 +30,7 @@ if( MPFI_FOUND AND NOT MPFI_SETUP ) add_definitions( ${MPFI_DEFINITIONS} "-DCGAL_USE_MPFI" ) link_libraries( ${MPFI_LIBRARIES} ) else( COMPILED_MPFI_TEST AND MPFI_TEST_RESULT EQUAL 0) - if (CGAL_ENABLE_PRECONFIG) - message( STATUS "MPFI is incorrectly configured with CGAL" ) - else() - message( STATUS "MPFI is incorrectly configured on this system" ) - endif() + message( STATUS "MPFI is incorrectly configured on this system" ) message( STATUS "Output of the failed MPFI test was:\n${MPFI_TEST_COMPILATION_OUTPUT}" ) message( STATUS "End of the MPFI test output" ) diff --git a/Installation/cmake/modules/CGAL_add_test.cmake b/Installation/cmake/modules/CGAL_add_test.cmake index a0913c18de6..1ee459d1367 100644 --- a/Installation/cmake/modules/CGAL_add_test.cmake +++ b/Installation/cmake/modules/CGAL_add_test.cmake @@ -5,30 +5,10 @@ set(CGAL_add_test_included TRUE) option(BUILD_TESTING "Build the testing tree." OFF) -if(NOT POLICY CMP0064) - # CMake <= 3.3 - if(BUILD_TESTING) - message(WARNING - "CGAL CTest support requires CMake 3.4 or later.\n" - "You must either disable BUILD_TESTING or upgrade CMake.") - endif() - - # Add a fake function to avoid CMake errors - function(cgal_add_compilation_test) - endfunction() - # Add a fake function to avoid CMake errors - function(cgal_setup_test_properties) - endfunction() - - # Then return, to exit the file - return() -endif() - if(BUILD_TESTING) enable_testing() endif() -cmake_policy(SET CMP0064 NEW) include(CMakeParseArguments) @@ -94,7 +74,7 @@ function(expand_list_with_globbing list_name) endfunction() function(cgal_add_compilation_test exe_name) - if(NOT POLICY CMP0064 OR TEST compilation_of__${exe_name}) + if(TEST compilation_of__${exe_name}) return() endif() add_test(NAME "compilation_of__${exe_name}" @@ -111,15 +91,11 @@ function(cgal_add_compilation_test exe_name) COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target "cgal_check_build_system" --config "$") set_property(TEST "check_build_system" APPEND PROPERTY LABELS "CGAL_build_system") - if(POLICY CMP0066) # cmake 3.7 or later - set_property(TEST "check_build_system" - PROPERTY FIXTURES_SETUP "check_build_system_SetupFixture") - endif() - endif() - if(POLICY CMP0066) # cmake 3.7 or later - set_property(TEST "compilation_of__${exe_name}" - APPEND PROPERTY FIXTURES_REQUIRED "check_build_system_SetupFixture") + set_property(TEST "check_build_system" + PROPERTY FIXTURES_SETUP "check_build_system_SetupFixture") endif() + set_property(TEST "compilation_of__${exe_name}" + APPEND PROPERTY FIXTURES_REQUIRED "check_build_system_SetupFixture") if(TARGET CGAL_Qt5_moc_and_resources) # if CGAL_Qt5 was searched, and is header-only get_property(linked_libraries TARGET "${exe_name}" PROPERTY LINK_LIBRARIES) # message(STATUS "${exe_name} depends on ${linked_libraries}") @@ -167,8 +143,7 @@ function(cgal_setup_test_properties test_name) get_filename_component(_binary_dir_abs ${CMAKE_CURRENT_BINARY_DIR} ABSOLUTE) string(FIND "${_binary_dir_abs}" "${_source_dir_abs}" _search_binary_in_source) - if(_search_binary_in_source EQUAL "-1" - AND POLICY CMP0066) # CMake 3.7 or later + if(_search_binary_in_source EQUAL "-1") if(NOT TEST ${PROJECT_NAME}_SetupFixture) if(ANDROID) add_test(NAME ${PROJECT_NAME}_SetupFixture @@ -280,7 +255,7 @@ function(cgal_add_test exe_name) set(test_name "execution___of__${exe_name}") endif() # message(" test_name: ${test_name}") - if(cgal_add_test_NO_EXECUTION OR NOT POLICY CMP0064 OR TEST ${test_name}) + if(cgal_add_test_NO_EXECUTION OR TEST ${test_name}) return() endif() # message("Add test ${test_name}") @@ -323,11 +298,11 @@ function(cgal_add_test exe_name) set(ARGS) # message(STATUS "DEBUG test ${exe_name}") foreach(CMD_LINE ${CMD_LINES}) - # message(STATUS " command line: ${CMD_LINE}") + # message(STATUS " command line: ${CMD_LINE}") string(REGEX REPLACE "\#.*" "" CMD_LINE "${CMD_LINE}") - separate_arguments(CMD_LINE_ARGS UNIX_COMMAND ${CMD_LINE}) - # message(STATUS " args: ${CMD_LINE_ARGS}") - list(APPEND ARGS ${CMD_LINE_ARGS}) + separate_arguments(CMD_LINE_ARGS UNIX_COMMAND ${CMD_LINE}) + # message(STATUS " args: ${CMD_LINE_ARGS}") + list(APPEND ARGS ${CMD_LINE_ARGS}) endforeach() expand_list_with_globbing(ARGS) set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/Installation/cmake/modules/CGAL_display_flags.cmake b/Installation/cmake/modules/CGAL_display_flags.cmake index 777d6402898..5367ac3c0e7 100644 --- a/Installation/cmake/modules/CGAL_display_flags.cmake +++ b/Installation/cmake/modules/CGAL_display_flags.cmake @@ -10,12 +10,4 @@ string( TOUPPER "${CMAKE_BUILD_TYPE}" CGAL_BUILD_TYPE_UPPER ) message( STATUS "USING CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" ) -if ( CGAL_BUILDING_LIBS ) - if ( BUILD_SHARED_LIBS ) - message( STATUS "USING LDFLAGS = '${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" ) - else() - message( STATUS "USING LDFLAGS = '${CMAKE_STATIC_LINKER_FLAGS} ${CMAKE_STATIC_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" ) - endif() -else() - message( STATUS "USING EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" ) -endif() +message( STATUS "USING EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${CGAL_BUILD_TYPE_UPPER}}'" ) diff --git a/Installation/cmake/modules/CGAL_setup_target_dependencies.cmake b/Installation/cmake/modules/CGAL_setup_target_dependencies.cmake index 73a357b4d08..bed40154c80 100644 --- a/Installation/cmake/modules/CGAL_setup_target_dependencies.cmake +++ b/Installation/cmake/modules/CGAL_setup_target_dependencies.cmake @@ -1,17 +1,11 @@ function(CGAL_setup_target_dependencies target) - if(ARGV1 STREQUAL INTERFACE) - set(keyword INTERFACE) - else() - set(keyword PUBLIC) - endif() - if(${target} STREQUAL CGAL) - CGAL_setup_CGAL_dependencies(${target} ${keyword}) + CGAL_setup_CGAL_dependencies(${target}) elseif(${target} STREQUAL CGAL_Core) - CGAL_setup_CGAL_Core_dependencies(${target} ${keyword}) + CGAL_setup_CGAL_Core_dependencies(${target}) elseif(${target} STREQUAL CGAL_ImageIO) - CGAL_setup_CGAL_ImageIO_dependencies(${target} ${keyword}) + CGAL_setup_CGAL_ImageIO_dependencies(${target}) elseif(${target} STREQUAL CGAL_Qt5) - CGAL_setup_CGAL_Qt5_dependencies(${target} ${keyword}) + CGAL_setup_CGAL_Qt5_dependencies(${target}) endif() endfunction() diff --git a/Installation/cmake/modules/UseCGAL.cmake b/Installation/cmake/modules/UseCGAL.cmake index 0187802b524..963354f8aee 100644 --- a/Installation/cmake/modules/UseCGAL.cmake +++ b/Installation/cmake/modules/UseCGAL.cmake @@ -27,8 +27,6 @@ if(NOT USE_CGAL_FILE_INCLUDED) use_component( ${component} ) endforeach() - use_essential_libs() - include_directories( "${CMAKE_CURRENT_BINARY_DIR}" ) if(TARGET CGAL::CGAL) diff --git a/Installation/demo/CMakeLists.txt b/Installation/demo/CMakeLists.txt index 8f0b28cb33a..0e2de825566 100644 --- a/Installation/demo/CMakeLists.txt +++ b/Installation/demo/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1...3.15) +cmake_minimum_required(VERSION 3.12...3.18) project(CGAL_DEMOS) if(CGAL_BRANCH_BUILD) @@ -17,10 +17,8 @@ endif() list(SORT list) -if(NOT CGAL_BUILDING_LIBS) - find_package(CGAL REQUIRED) - include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake) -endif() +find_package(CGAL REQUIRED) +include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake) message("== Generating build files for demos ==") foreach(entry ${list}) diff --git a/Installation/examples/CMakeLists.txt b/Installation/examples/CMakeLists.txt index cf7b9e215a2..24cf289021b 100644 --- a/Installation/examples/CMakeLists.txt +++ b/Installation/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1...3.15) +cmake_minimum_required(VERSION 3.12...3.18) project(CGAL_EXAMPLES) if(CGAL_BRANCH_BUILD) @@ -17,10 +17,8 @@ endif() list(SORT list) -if(NOT CGAL_BUILDING_LIBS) - find_package(CGAL REQUIRED) - include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake) -endif() +find_package(CGAL REQUIRED) +include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake) message("== Generating build files for examples ==") foreach(entry ${list}) diff --git a/Installation/lib/cmake/CGAL/CGALConfig.cmake b/Installation/lib/cmake/CGAL/CGALConfig.cmake index 92f6a884000..bb8bdcc9c93 100644 --- a/Installation/lib/cmake/CGAL/CGALConfig.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfig.cmake @@ -9,8 +9,6 @@ set(CGAL_LIBRARIES CGAL) get_filename_component(CGAL_CONFIG_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) -set(CGAL_HEADER_ONLY TRUE) - function(cgal_detect_branch_build VAR_NAME) if(IS_DIRECTORY ${CGAL_CONFIG_DIR}/../../../../Installation/package_info/Installation/) set(${VAR_NAME} TRUE PARENT_SCOPE) @@ -35,10 +33,10 @@ if(BRANCH_BUILD) foreach(package_dir ${packages_dirs}) set(inc_dir ${package_dir}/include) if(IS_DIRECTORY ${inc_dir} - AND IS_DIRECTORY ${package_dir}/package_info) + AND IS_DIRECTORY ${package_dir}/package_info) list(APPEND CGAL_INCLUDE_DIRS ${inc_dir}) if(EXISTS ${inc_dir}/CGAL/config.h) - set(CGAL_FOUND TRUE) + set(CGAL_FOUND TRUE) endif() endif() endforeach() @@ -81,21 +79,15 @@ include(${CGAL_MODULES_DIR}/CGAL_TweakFindBoost.cmake) set(CGAL_USE_FILE ${CGAL_MODULES_DIR}/UseCGAL.cmake) - -if(CGAL_BUILDING_LIBS) - foreach(comp ${CGAL_FIND_COMPONENTS}) - if(CGAL_${comp}_FOUND) - list(APPEND CGAL_LIBRARIES CGAL_${comp}) - endif() - endforeach() - return() -endif() - foreach(comp ${CGAL_FIND_COMPONENTS}) if(NOT comp MATCHES "Core|ImageIO|Qt5") message(FATAL_ERROR "The requested CGAL component ${comp} does not exist!") endif() - list(APPEND CGAL_LIBRARIES CGAL_${comp}) + if(comp MATCHES "Core" AND CGAL_DISABLE_GMP) + message("CGAL_Core needs GMP and won't be used.") + else() + list(APPEND CGAL_LIBRARIES CGAL_${comp}) + endif() endforeach() set(CGALConfig_all_targets_are_defined TRUE) @@ -138,15 +130,11 @@ include(CGAL_setup_target_dependencies) foreach(cgal_lib ${CGAL_LIBRARIES}) set(WITH_${cgal_lib} TRUE) if(${cgal_lib}_FOUND AND NOT TARGET ${cgal_lib}) - if(CGAL_BUILDING_LIBS OR CMAKE_VERSION VERSION_LESS "3.11") - add_library(${cgal_lib} INTERFACE) - else() - add_library(${cgal_lib} INTERFACE IMPORTED GLOBAL) - endif() + add_library(${cgal_lib} INTERFACE IMPORTED GLOBAL) if(NOT TARGET CGAL::${cgal_lib}) add_library(CGAL::${cgal_lib} ALIAS ${cgal_lib}) endif() - CGAL_setup_target_dependencies(${cgal_lib} INTERFACE) + CGAL_setup_target_dependencies(${cgal_lib}) endif() endforeach() diff --git a/Installation/src/CGAL/CMakeLists.txt b/Installation/src/CGAL/CMakeLists.txt deleted file mode 100644 index d4474a5138f..00000000000 --- a/Installation/src/CGAL/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -message("Configuring libCGAL") - -collect_cgal_library(CGAL "") - -include(CGAL_SetupCGALDependencies) - -if(CGAL_HEADER_ONLY) - set(keyword "INTERFACE") -endif() - -cgal_setup_cgal_dependencies(CGAL ${keyword}) - -if(NOT CGAL_HEADER_ONLY) - target_compile_definitions(CGAL INTERFACE CGAL_NOT_HEADER_ONLY=1) -endif() - -if(NOT CGAL_DISABLE_GMP) - get_dependency_version(GMP) - get_dependency_version(MPFR) -endif() - -message( - STATUS - "USING BOOST_VERSION = '${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}'" -) - -message("libCGAL is configured") diff --git a/Installation/src/CGAL_libs_verinfo.rc.in b/Installation/src/CGAL_libs_verinfo.rc.in deleted file mode 100644 index 56a65021857..00000000000 --- a/Installation/src/CGAL_libs_verinfo.rc.in +++ /dev/null @@ -1,68 +0,0 @@ -# if defined(UNDER_CE) -# include -# else -# include -# endif - -// The following is set by CMake -#cmakedefine CGAL_BRANCH_BUILD - -// The values of the following variable are filled by CMake -#define CGAL_LIB_NAME @LIBRARY_NAME@ -#define CGAL_VERSION_MAJOR @CGAL_MAJOR_VERSION@ -#define CGAL_VERSION_MINOR @CGAL_MINOR_VERSION@ -#define CGAL_VERSION_PATCH @CGAL_BUGFIX_VERSION@ -#define CGAL_VERSION_BUILD @CGAL_BUILD_VERSION@ -#ifdef _DEBUG -# define CGAL_LIB_FULLNAME "@DEBUG_MANGLED_NAME@.dll" -#else -# define CGAL_LIB_FULLNAME "@RELEASE_MANGLED_NAME@.dll" -#endif - -#define CGAL_VER_EMPTY_STR "\0" -#define CGAL_VER_xxstr(s) #s -#define CGAL_VER_xstr(s) CGAL_VER_xxstr(s) CGAL_VER_EMPTY_STR -#define CGAL_VER_str(s) CGAL_VER_xstr(s) - -#define CGAL_VER_VERSION CGAL_VERSION_MAJOR,CGAL_VERSION_MINOR,CGAL_VERSION_PATCH,CGAL_VERSION_BUILD -#define CGAL_VER_VERSION_STR CGAL_VER_str(CGAL_VERSION_MAJOR) "." CGAL_VER_str(CGAL_VERSION_MINOR) "." CGAL_VER_str(CGAL_VERSION_PATCH) "." CGAL_VER_str(CGAL_VERSION_BUILD) -#define CGAL_VER_COMPANYNAME_STR "The CGAL Project, https://www.cgal.org/\0" -#define CGAL_VER_FILEDESCRIPTION_STR "@LIBRARY_NAME@ Library\0" -#define CGAL_VER_FILEVERSION_STR CGAL_VER_VERSION_STR -#define CGAL_VER_ORIGINALFILENAME_STR CGAL_LIB_FULLNAME CGAL_VER_EMPTY_STR -#define CGAL_VER_PRODUCTNAME_STR "CGAL\0" -#define CGAL_VER_PRODUCTVERSION_STR CGAL_VER_VERSION_STR - -VS_VERSION_INFO VERSIONINFO - FILEVERSION CGAL_VER_VERSION - PRODUCTVERSION CGAL_VER_VERSION - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE 0x0L - BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - BEGIN - VALUE "CompanyName", CGAL_VER_COMPANYNAME_STR - VALUE "FileDescription", CGAL_VER_FILEDESCRIPTION_STR - VALUE "FileVersion", CGAL_VER_FILEVERSION_STR - VALUE "OriginalFilename", CGAL_VER_ORIGINALFILENAME_STR - VALUE "ProductName", CGAL_VER_PRODUCTNAME_STR - VALUE "ProductVersion", CGAL_VER_PRODUCTVERSION_STR - END - END - - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END - END -/* End of Version info */ - diff --git a/Installation/src/CMakeLists.txt b/Installation/src/CMakeLists.txt deleted file mode 100644 index a4684d2b13b..00000000000 --- a/Installation/src/CMakeLists.txt +++ /dev/null @@ -1,276 +0,0 @@ -function(collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES) - - if(NOT CGAL_HEADER_ONLY) - # IMPORTANT: First delete all_files.cpp - if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp) - file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp) - endif() - - # THEN collect *.cpp - foreach(package ${CGAL_CONFIGURED_PACKAGES}) - file(GLOB CGAL_LIBRARY_SOURCE_FILES_TMP - ${package}/src/${LIBRARY_NAME}/*.cpp) - list(SORT CGAL_LIBRARY_SOURCE_FILES_TMP) - foreach(file ${CGAL_LIBRARY_SOURCE_FILES_TMP}) - if(NOT ${file} MATCHES "/qrc_.*") - list(APPEND CGAL_LIBRARY_SOURCE_FILES ${file}) - endif() - endforeach() - endforeach() - - foreach(source ${CGAL_LIBRARY_SOURCE_FILES}) - # It may happen that a file all_files.cpp had been created in-source by - # a previous in-source build. We certainly do not want to include that - # file in the new all_files.cpp because .cpp files would be included - # twice, and that breaks the one-definition rule (ODR). - if(NOT source MATCHES ".*/all_files.cpp") - file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp - "\#include \"${source}\"\n") - endif() - endforeach() - endif() - - if(CGAL_BUILD_SHARED_LIBS) - set(CGAL_LIB_PREFIX "") - else() - set(CGAL_LIB_PREFIX "lib") - endif() - - set(RELEASE_MANGLED_NAME - "${CGAL_LIB_PREFIX}${LIBRARY_NAME}-${CGAL_TOOLSET}-mt-${CGAL_FULL_VERSION}" - ) - set(DEBUG_MANGLED_NAME - "${CGAL_LIB_PREFIX}${LIBRARY_NAME}-${CGAL_TOOLSET}-mt-gd-${CGAL_FULL_VERSION}" - ) - - if(CGAL_BUILD_SHARED_LIBS AND WIN32) - configure_file(${CGAL_INSTALLATION_PACKAGE_DIR}/src/CGAL_libs_verinfo.rc.in - ${LIBRARY_NAME}_verinfo.rc @ONLY) - set(rc_file ${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME}_verinfo.rc) - else() - set(rc_file) - endif() - - if(NOT CGAL_HEADER_ONLY) - add_library(${LIBRARY_NAME} ${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp - ${rc_file} ${ADDITIONAL_FILES}) - # add_library (${LIBRARY_NAME} ${CGAL_LIBRARY_SOURCE_FILES} ${rc_file} ${ADDITIONAL_FILES}) # builing not creating temporary all_files.cpp - if(${LIBRARY_NAME}_SOVERSION AND ${LIBRARY_NAME}_SONAME_VERSION) - set_target_properties( - ${LIBRARY_NAME} - PROPERTIES VERSION "${${LIBRARY_NAME}_SOVERSION}" - SOVERSION "${${LIBRARY_NAME}_SONAME_VERSION}") - elseif(CGAL_SOVERSION AND CGAL_SONAME_VERSION) - set_target_properties( - ${LIBRARY_NAME} PROPERTIES VERSION "${CGAL_SOVERSION}" - SOVERSION "${CGAL_SONAME_VERSION}") - endif() - else() - if(${LIBRARY_NAME}_LIB_DEPENDS) - # Fix a bug when CGAL is configured first without `CGAL_HEADER_ONLY` - # and then `CGAL_HEADER_ONLY` is set without cleaning the cache. - unset(${LIBRARY_NAME}_LIB_DEPENDS CACHE) - endif() - add_library(${LIBRARY_NAME} INTERFACE) - endif() - - # Add an alias with the prefix `CGAL::`, so that consumer - # 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 OUTPUT_NAME_DEBUG "${DEBUG_MANGLED_NAME}" - OUTPUT_NAME_RELEASE "${RELEASE_MANGLED_NAME}" - OUTPUT_NAME_MINSIZEREL "${RELEASE_MANGLED_NAME}" - OUTPUT_NAME_RELWITHDEBINFO "${RELEASE_MANGLED_NAME}") - - if(HAS_CFG_INTDIR) - add_custom_command( - TARGET ${LIBRARY_NAME} - POST_BUILD - COMMAND if exist \"$(TargetDir)$(TargetName).dll\" copy /Y - \"$(TargetDir)$(TargetName).dll\" \"$(TargetDir)..\") - add_custom_command( - TARGET ${LIBRARY_NAME} - POST_BUILD - COMMAND if exist \"$(TargetDir)$(TargetName).pdb\" copy /Y - \"$(TargetDir)$(TargetName).pdb\" \"$(TargetDir)..\") - add_custom_command( - TARGET ${LIBRARY_NAME} - POST_BUILD - COMMAND - if exist - \"$(SolutionDir)lib\\$(ConfigurationName)\\$(TargetName).lib\" copy - /Y \"$(SolutionDir)lib\\$(ConfigurationName)\\$(TargetName).lib\" - \"$(SolutionDir)lib\") - endif() - endif() - endif() - - if(NOT CGAL_HEADER_ONLY) - install( - TARGETS ${LIBRARY_NAME} - EXPORT ${LIBRARY_NAME}Exports - RUNTIME DESTINATION "${CGAL_INSTALL_BIN_DIR}" - LIBRARY DESTINATION "${CGAL_INSTALL_LIB_DIR}" - ARCHIVE DESTINATION "${CGAL_INSTALL_LIB_DIR}") - install( - EXPORT ${LIBRARY_NAME}Exports - DESTINATION "${CGAL_INSTALL_CMAKE_DIR}" - NAMESPACE CGAL::) - - # We have to call configure_file twice to force double expansion of variables. - configure_file("${CGAL_MODULES_DIR}/CGALLibConfig.cmake.in" - "${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake" @ONLY) - configure_file("${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake" - "${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake" @ONLY) - install(FILES "${CMAKE_BINARY_DIR}/${LIBRARY_NAME}LibConfig.cmake" - DESTINATION ${CGAL_INSTALL_CMAKE_DIR}) - endif() -endfunction() - -function(configure_component DIR COMPONENT) - set(enabled_by_default ON) - option(WITH_${COMPONENT} "Enable CGAL component ${COMPONENT}" - ${enabled_by_default}) - if(WITH_${COMPONENT}) - add_subdirectory(${DIR} ${COMPONENT}) - endif() -endfunction() - -# Output directory of libraries (.so, .dylib, non-static .lib) -set(CGAL_LIBRARIES_DIR ${CMAKE_BINARY_DIR}/lib) -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CGAL_LIBRARIES_DIR}) -# Output directory of static libraries (.a, static .lib) -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CGAL_LIBRARIES_DIR}) - -# For output directory of DLLs (.dll files) -set(CGAL_RUNTIME_DIR ${CMAKE_BINARY_DIR}/bin) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CGAL_RUNTIME_DIR}) - -## Prevent use of intermediate directory with MSVC, because we use name -## mangling -#foreach(Conf_type ${CMAKE_CONFIGURATION_TYPES}) -# # Conf_type is Debug, Release, DebWithDebInfo... -# string(TOUPPER ${Conf_type} CONF_TYPE) -# # CONF_TYPE is DEBUG, RELEASE, DEBWITHDEBINFO -# set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONF_TYPE} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) -# set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONF_TYPE} ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}) -# set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONF_TYPE} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) -#endforeach() - -# TODO: Seems useless, because it is called again in ../CMakeLists.txt -# Should probably be removed. -- Laurent Rineau, 2014/07/22 -if(NOT CGAL_HEADER_ONLY) - create_cgalconfig_files() -endif() - -set(CGAL_DIR ${CMAKE_BINARY_DIR}) - -add_subdirectory(CGAL) - -# search libs -set(CGAL_CONFIGURED_LIBRARIES "") - -foreach(package ${CGAL_CONFIGURED_PACKAGES}) - file(GLOB CONFIGURED_LIBS_IN_PACKAGE ${package}/src/CGAL_*/CMakeLists.txt) - list(SORT CONFIGURED_LIBS_IN_PACKAGE) - foreach(libconfigfile ${CONFIGURED_LIBS_IN_PACKAGE}) - get_filename_component(CGAL_CONFIGURED_LIBRARY_NAME ${libconfigfile} PATH) - get_filename_component(CGAL_CONFIGURED_LIBRARY_NAME - ${CGAL_CONFIGURED_LIBRARY_NAME} NAME) - - if(NOT ${CGAL_CONFIGURED_LIBRARY_NAME} STREQUAL "CGAL") - - message( - STATUS - "Sources for CGAL component library '${CGAL_CONFIGURED_LIBRARY_NAME}' detected" - ) - list(APPEND CGAL_CONFIGURED_LIBRARIES ${CGAL_CONFIGURED_LIBRARY_NAME}) - #message(STATUS "Library config detected: ${CGAL_CONFIGURED_LIBRARIES}") - - cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_LIBRARY "") - cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_DEFINITIONS "") - cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_INCLUDE_DIRS "") - cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES "") - cache_set(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES_DIRS "") - if(${CGAL_CONFIGURED_LIBRARY_NAME} STREQUAL "CGAL_Core") - if(NOT CGAL_NO_CORE) - configure_component(${package}/src/${CGAL_CONFIGURED_LIBRARY_NAME} - ${CGAL_CONFIGURED_LIBRARY_NAME}) - else(NOT CGAL_NO_CORE) - message( - STATUS - "CGAL_Core is not being configured (missing GMP, or 64bit architecture)." - ) - endif(NOT CGAL_NO_CORE) - else() - configure_component(${package}/src/${CGAL_CONFIGURED_LIBRARY_NAME} - ${CGAL_CONFIGURED_LIBRARY_NAME}) - endif() - - cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_LIBRARY) - - cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_DEFINITIONS) - cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_INCLUDE_DIRS) - cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES) - cache_get(${CGAL_CONFIGURED_LIBRARY_NAME}_3RD_PARTY_LIBRARIES_DIRS) - - else() - - list(APPEND CGAL_CONFIGURED_LIBRARIES CGAL) - - endif() - endforeach() -endforeach() - -if(NOT CGAL_CONFIGURED_LIBRARIES) - message( - FATAL_ERROR - "No component library in configured packages found. Please fix package-file." - ) -endif() - -list(REMOVE_DUPLICATES CGAL_CONFIGURED_LIBRARIES) -list(SORT CGAL_CONFIGURED_LIBRARIES) -cache_set(CGAL_CONFIGURED_LIBRARIES "${CGAL_CONFIGURED_LIBRARIES}") - -# CGAL_CONFIGURED_LIBRARIES is a virtually useless variable, because -# we do not know if those components actually created a target. It -# might seem bad that we hardcode the target names here, but they have -# always been hardcoded in the CGALConfig files, so we do not make it -# any worse. We can also not use export(EXPORT) since that is only -# available in newer CMake versions. -set(CGAL_ACTUAL_CONFIGURED_LIBRARIES "") -macro(CGAL_add_if_target TARGET) - if(TARGET ${TARGET}) - list(APPEND CGAL_ACTUAL_CONFIGURED_LIBRARIES ${TARGET}) - endif() -endmacro() - -cgal_add_if_target(CGAL) -cgal_add_if_target(CGAL_Core) -cgal_add_if_target(CGAL_ImageIO) -cgal_add_if_target(CGAL_Qt5) - -cache_set(CGAL_ACTUAL_CONFIGURED_LIBRARIES - "${CGAL_ACTUAL_CONFIGURED_LIBRARIES}") - -if(NOT CGAL_HEADER_ONLY) - export( - TARGETS ${CGAL_ACTUAL_CONFIGURED_LIBRARIES} - NAMESPACE CGAL:: - FILE "${CMAKE_BINARY_DIR}/CGALExports.cmake") -endif() - -message( - STATUS - "Sources for CGAL component libraries '${CGAL_CONFIGURED_LIBRARIES}' detected" -) diff --git a/Installation/test/CMakeLists.txt b/Installation/test/CMakeLists.txt index d01cbc74f7c..417295084e0 100644 --- a/Installation/test/CMakeLists.txt +++ b/Installation/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1...3.15) +cmake_minimum_required(VERSION 3.12...3.18) project(CGAL_TESTS) if(CGAL_BRANCH_BUILD) @@ -17,10 +17,8 @@ endif() list(SORT list) -if(NOT CGAL_BUILDING_LIBS) - find_package(CGAL REQUIRED) - include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake) -endif() +find_package(CGAL REQUIRED) +include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake) message("== Generating build files for tests ==") foreach(entry ${list}) diff --git a/Installation/test/Installation/CMakeLists.txt b/Installation/test/Installation/CMakeLists.txt index f22bddd7708..de1278d6c82 100644 --- a/Installation/test/Installation/CMakeLists.txt +++ b/Installation/test/Installation/CMakeLists.txt @@ -1,7 +1,8 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -cmake_minimum_required(VERSION 3.11...3.15) +cmake_minimum_required(VERSION 3.12...3.18) + project( Installation_Tests ) @@ -221,7 +222,7 @@ list(APPEND test_config_lst "test_config_file_3") if(CGAL_Qt5_FOUND) #configure cgal for a non standard install with qt5 add_test(NAME config_non_standard_cgal_qt5 - COMMAND ${CMAKE_COMMAND} ${GENERATOR} ${INIT_FILE} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${NON_STANDARD_INSTALL_PREFIX}/non_standard_install_qt5 -DCGAL_INSTALL_LIB_DIR=lib -DWITH_CGAL_Qt5=ON + COMMAND ${CMAKE_COMMAND} ${GENERATOR} ${INIT_FILE} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${NON_STANDARD_INSTALL_PREFIX}/non_standard_install_qt5 -DCGAL_INSTALL_LIB_DIR=lib "${CGAL_SOURCE_DIR}" WORKING_DIRECTORY "${NON_STANDARD_INSTALL_PREFIX}/non_standard_build_qt5") #install cgal in the non standard place diff --git a/Kernel_23/src/CGAL/kernel.cpp b/Kernel_23/src/CGAL/kernel.cpp deleted file mode 100644 index 73c0aeec5f7..00000000000 --- a/Kernel_23/src/CGAL/kernel.cpp +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 1999 -// Utrecht University (The Netherlands), -// ETH Zurich (Switzerland), -// INRIA Sophia-Antipolis (France), -// Max-Planck-Institute Saarbruecken (Germany), -// and Tel-Aviv University (Israel). All rights reserved. -// -// This file is part of CGAL (www.cgal.org) -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : Andreas Fabri, Stefan Schirra - -#ifndef CGAL_HEADER_ONLY -#include -#include -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/Number_types/src/CGAL/Interval_arithmetic.cpp b/Number_types/src/CGAL/Interval_arithmetic.cpp deleted file mode 100644 index c64a80f7923..00000000000 --- a/Number_types/src/CGAL/Interval_arithmetic.cpp +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 1999-2004 -// Utrecht University (The Netherlands), -// ETH Zurich (Switzerland), -// INRIA Sophia-Antipolis (France), -// Max-Planck-Institute Saarbruecken (Germany), -// and Tel-Aviv University (Israel). All rights reserved. -// -// This file is part of CGAL (www.cgal.org) -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : Sylvain Pion - -#ifndef CGAL_HEADER_ONLY - -#include -#include -#include - -#endif diff --git a/Number_types/src/CGAL/test_FPU_rounding_mode.cpp b/Number_types/src/CGAL/test_FPU_rounding_mode.cpp deleted file mode 100644 index c551abeba99..00000000000 --- a/Number_types/src/CGAL/test_FPU_rounding_mode.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2008 GeometryFactory (France) -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org) -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : Laurent Rineau - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif diff --git a/Optimisation_basic/package_info/Optimisation_basic/dependencies b/Optimisation_basic/package_info/Optimisation_basic/dependencies index e69de29bb2d..4b1b3cb93f3 100644 --- a/Optimisation_basic/package_info/Optimisation_basic/dependencies +++ b/Optimisation_basic/package_info/Optimisation_basic/dependencies @@ -0,0 +1,4 @@ +Installation +Kernel_23 +Profiling_tools +STL_Extension diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index 19d7cc93284..a9fb73257da 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -1,22 +1,5 @@ -cmake_minimum_required(VERSION 3.1...3.15) -project(Polyhedron_Demo) - -if(NOT POLICY CMP0070 AND POLICY CMP0053) - # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. - cmake_policy(SET CMP0053 OLD) -endif() -if(POLICY CMP0071) - cmake_policy(SET CMP0071 NEW) -endif() -if(POLICY CMP0072) - # About the use of OpenGL - cmake_policy(SET CMP0072 NEW) -endif() - -if(POLICY CMP0074) - cmake_policy(SET CMP0074 NEW) -endif() - +cmake_minimum_required(VERSION 3.1...3.20) +project( Polyhedron_Demo ) include(FeatureSummary) # Find includes in corresponding build directories @@ -247,9 +230,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) # CMake). That is to deal with the visibility of symbols of # `Three.h`/`Three.cpp`. target_compile_definitions(demo_framework PRIVATE three_EXPORTS=1) - if(CGAL_HEADER_ONLY) - target_compile_definitions(demo_framework PRIVATE -DCGAL_USE_Qt5_RESOURCES) - endif() + target_compile_definitions(demo_framework PRIVATE -DCGAL_USE_Qt5_RESOURCES) add_library(scene_basic_objects SHARED Scene_plane_item.cpp Scene_spheres_item.cpp) diff --git a/Profiling_tools/src/CGAL/Real_timer.cpp b/Profiling_tools/src/CGAL/Real_timer.cpp deleted file mode 100644 index 7fece958091..00000000000 --- a/Profiling_tools/src/CGAL/Real_timer.cpp +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 1997 -// Utrecht University (The Netherlands), -// ETH Zurich (Switzerland), -// INRIA Sophia-Antipolis (France), -// Max-Planck-Institute Saarbruecken (Germany), -// and Tel-Aviv University (Israel). All rights reserved. -// -// This file is part of CGAL (www.cgal.org) -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : Lutz Kettner -// Matthias Baesken - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -namespace CGAL { - -bool Real_timer::m_failed = false; - -} //namespace CGAL - -#endif // CGAL_HEADER_ONLY diff --git a/Profiling_tools/src/CGAL/Timer.cpp b/Profiling_tools/src/CGAL/Timer.cpp deleted file mode 100644 index 217e3d8f459..00000000000 --- a/Profiling_tools/src/CGAL/Timer.cpp +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 1997 -// Utrecht University (The Netherlands), -// ETH Zurich (Switzerland), -// INRIA Sophia-Antipolis (France), -// Max-Planck-Institute Saarbruecken (Germany), -// and Tel-Aviv University (Israel). All rights reserved. -// -// This file is part of CGAL (www.cgal.org) -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : Lutz Kettner -// Matthias Baesken - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -namespace CGAL { - -bool Timer::m_failed = false; - -} //namespace CGAL - -#endif // CGAL_HEADER_ONLY diff --git a/Random_numbers/src/CGAL/Random.cpp b/Random_numbers/src/CGAL/Random.cpp deleted file mode 100644 index 29e2ce7639a..00000000000 --- a/Random_numbers/src/CGAL/Random.cpp +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 1997-2001 -// Utrecht University (The Netherlands), -// ETH Zurich (Switzerland), -// INRIA Sophia-Antipolis (France), -// Max-Planck-Institute Saarbruecken (Germany), -// and Tel-Aviv University (Israel). All rights reserved. -// -// This file is part of CGAL (www.cgal.org) -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : Sven Schönherr - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -namespace CGAL { - - Random default_random; - -} //namespace CGAL - -#endif diff --git a/STL_Extension/src/CGAL/assertions.cpp b/STL_Extension/src/CGAL/assertions.cpp deleted file mode 100644 index f28f656b1c0..00000000000 --- a/STL_Extension/src/CGAL/assertions.cpp +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 1997 -// Utrecht University (The Netherlands), -// ETH Zurich (Switzerland), -// INRIA Sophia-Antipolis (France), -// Max-Planck-Institute Saarbruecken (Germany), -// and Tel-Aviv University (Israel). All rights reserved. -// -// This file is part of CGAL (www.cgal.org) -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : Geert-Jan Giezeman and Sven Schönherr - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY diff --git a/Scripts/developer_scripts/cgal_check_dependencies.sh b/Scripts/developer_scripts/cgal_check_dependencies.sh index 01e4777ab6a..46c7871152e 100644 --- a/Scripts/developer_scripts/cgal_check_dependencies.sh +++ b/Scripts/developer_scripts/cgal_check_dependencies.sh @@ -30,7 +30,7 @@ do fi done -cmake -DCGAL_HEADER_ONLY=FALSE -DCGAL_BUILD_THREE_DOC=TRUE -DCGAL_ENABLE_CHECK_HEADERS=TRUE -DDOXYGEN_EXECUTABLE="$DOX_PATH" -DCGAL_COPY_DEPENDENCIES=TRUE -DCMAKE_CXX_FLAGS="-std=c++1y" .. +cmake -DCGAL_ENABLE_CHECK_HEADERS=TRUE -DDOXYGEN_EXECUTABLE="$DOX_PATH" -DCGAL_COPY_DEPENDENCIES=TRUE -DCMAKE_CXX_FLAGS="-std=c++1y" .. if [ -n "$DO_CHECK_HEADERS" ]; then make -j$(nproc --all) -k check_headers fi diff --git a/Scripts/developer_scripts/check_library_uses_no_gpl_files b/Scripts/developer_scripts/check_library_uses_no_gpl_files index 1d88879cfc0..32960caefda 100755 --- a/Scripts/developer_scripts/check_library_uses_no_gpl_files +++ b/Scripts/developer_scripts/check_library_uses_no_gpl_files @@ -70,7 +70,7 @@ rm -fr demo/[A-Z]* rm -fr examples/[A-Z]* # Somehow -DWITH_CGAL_Core=OFF is not taken into account, hence the CORE files # are listed in the exceptions file. -cmake . -DBUILD_SHARED_LIBS=TRUE -DWITH_CGAL_Qt5=OFF -DWITH_CGAL_Core=OFF +cmake . make | grep -C 10 "No such file" || true echo " done" echo diff --git a/Scripts/developer_scripts/run_testsuite_with_ctest b/Scripts/developer_scripts/run_testsuite_with_ctest index e576403c326..06ccd107d37 100644 --- a/Scripts/developer_scripts/run_testsuite_with_ctest +++ b/Scripts/developer_scripts/run_testsuite_with_ctest @@ -262,14 +262,14 @@ run_test_on_platform() if [ ! -f "${INIT_FILE}" ]; then echo "error NEED A INIT FILE !" fi - cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=OFF -DWITH_tests=OFF -DWITH_CGAL_Qt5=OFF -DCGAL_HEADER_ONLY=ON $CGAL_DIR>installation.log 2>&1 + cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=OFF -DWITH_tests=OFF $CGAL_DIR>installation.log 2>&1 rm CMakeCache.txt CMAKE_OPTS="-DCGAL_TEST_SUITE=ON -DCMAKE_VERBOSE_MAKEFILE=ON" if [ -n "${SCRIPTS_DIR}" ]; then CMAKE_OPTS="${CMAKE_OPTS} -DWITH_examples=ON -DWITH_demos=ON" fi if [ -z "${SHOW_PROGRESS}" ]; then - cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=ON ${CMAKE_OPTS} $CGAL_DIR >package_installation.log 2>&1 + cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=ON ${CMAKE_OPTS} $CGAL_DIR >package_installation.log 2>&1 else cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=ON ${CMAKE_OPTS} $CGAL_DIR 2>&1 |tee package_installation.log fi diff --git a/Scripts/scripts/cgal_create_CMakeLists b/Scripts/scripts/cgal_create_CMakeLists index 2be5be308a3..67db54e8d38 100755 --- a/Scripts/scripts/cgal_create_CMakeLists +++ b/Scripts/scripts/cgal_create_CMakeLists @@ -29,12 +29,10 @@ #BLAS #LAPACK #OPENNL -#QGLViewer (or implied by Qt4?) #ESBTL #NTL #Core (implies GMP+GMPXX) -#Qt4 (implies QT4) #ImageIO #not (yet) supported @@ -44,21 +42,19 @@ create_cmake_script_with_options() { - qt4='n' - # parse options file if [ -e "$OPTIONS_FILE" ]; then OLDIFS="$IFS" IFS=$'\n' - for LINE in `cat $OPTIONS_FILE`; do + for LINE in `cat $OPTIONS_FILE`; do # CGAL components if [ -z "$CGAL_COMPONENTS_GIVEN" ]; then # read file only if not given! next_cgal_component=`echo $LINE | grep -v "#" | grep CGAL_COMPONENT` if [ ! -z "$next_cgal_component" ]; then next_cgal_component=${next_cgal_component/CGAL_COMPONENT /} - if [ -z "$CGAL_COMPONENTS" ]; then + if [ -z "$CGAL_COMPONENTS" ]; then CGAL_COMPONENTS=$next_cgal_component else CGAL_COMPONENTS=$CGAL_COMPONENTS":"$next_cgal_component @@ -114,11 +110,10 @@ fi if [ ! -z "$CGAL_COMPONENTS" ]; then # ensure capitalization - # CGAL: Core, Qt4, PDB, ImageIO + # CGAL: Core, PDB, ImageIO CGAL_COMPONENTS=${CGAL_COMPONENTS//[c|C][o|O][r|R][e|E]/Core} - CGAL_COMPONENTS=${CGAL_COMPONENTS//[q|Q][t|T]4/Qt4} CGAL_COMPONENTS=${CGAL_COMPONENTS//[i|I][m|M][a|A][g|G][e|E][i|I][o|O]/ImageIO} - + # external libs CGAL_COMPONENTS=${CGAL_COMPONENTS//[g|G][m|M][p|P]/GMP} @@ -153,11 +148,6 @@ fi for cgal_component in $CGAL_COMPONENTS; do COMPONENT=`echo $cgal_component | tr '[:upper:]' '[:lower:]'` - # for qtmoc - if [ "$COMPONENT" = "qt4" ]; then - qt4='y' - fi - done IFS=$OLDIFS @@ -241,31 +231,6 @@ EOF #------------------------------------------------------------------------- fi - # Qt4 - if [ "$qt4" = "y" ]; then - - #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv - cat << 'EOF' - -# Qt4 -set( QT_USE_QTXML true ) -set( QT_USE_QTMAIN true ) -set( QT_USE_QTSCRIPT true ) -set( QT_USE_QTOPENGL true ) - -find_package(Qt4) - -if ( NOT QT_FOUND ) - - message(STATUS "This project requires the Qt4 library, and will not be compiled.") - return() - -endif() -EOF - #------------------------------------------------------------------------- - - fi #qt4 - if [ ! -z "$BOOST_COMPONENTS" ]; then #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv cat << 'EOF' @@ -308,22 +273,6 @@ EOF # add a new line echo - # Qt4 - if [ "$qt4" = "y" ]; then - #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv - cat << 'EOF' - -if ( CGAL_Qt4_FOUND AND QT_FOUND ) - - include( ${QT_USE_FILE} ) - include_directories( ${QT_INCLUDE_DIR} ) - -endif() - -EOF - #----------------------------------------------------------------------- - fi # qt4 - for file in `ls *.cc *.cp *.cxx *.cpp *.CPP *.c++ *.C 2> /dev/null | sort` ; do # Create an executable for each cpp that contains a function "main()" BASE=`basename $file .cc` @@ -335,12 +284,8 @@ EOF BASE=`basename $BASE .C` egrep '\bmain[ \t]*\(' $file >/dev/null 2>&1 if [ $? -eq 0 ]; then - if [ "$qt4" = "y" ]; then - echo "create_single_source_cgal_program_qt4( \"$file\" )" - else - echo "create_single_source_cgal_program( \"$file\" )" - fi - if [ -n "$ENABLE_CTEST" ]; then + echo "create_single_source_cgal_program( \"$file\" )" + if [ -n "$ENABLE_CTEST" ]; then if [ -f "$BASE.cin" ] ; then CIN=" < $BASE.cin" else @@ -384,73 +329,6 @@ EOF all="$all $file" done - # Qt4 - if [ "$qt4" = "y" ]; then - #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv - cat << 'EOF' - -if ( CGAL_Qt4_FOUND AND QT_FOUND ) - - include( ${QT_USE_FILE} ) - include_directories( ${QT_INCLUDE_DIR} ) - -EOF - #----------------------------------------------------------------------- - - echo " # UI files (Qt Designer files)" - for file in `ls *.ui 2> /dev/null | sort`; do - echo " qt4_wrap_ui( DT_UI_FILES $file )" - done - echo - echo " # qrc files (resources files, that contain icons, at least)" - for file in `ls *.qrc 2> /dev/null | sort`; do - echo " qt4_add_resources ( DT_RESOURCE_FILES ./$file )" - done - echo - MOC_FILES="" - echo " # use the Qt MOC preprocessor on classes that derives from QObject" - for file in `ls include/*.h 2> /dev/null | sort`; do - BASE=`basename $file .h` - egrep 'Q_OBJECT' $file >/dev/null 2>&1 - if [ $? -eq 0 ]; then - echo " qt4_generate_moc( include/${BASE}.h ${BASE}.moc )" - MOC_FILES="${BASE}.moc $MOC_FILES" - fi - done - for file in `ls *.h 2> /dev/null | sort`; do - BASE=`basename $file .h` - egrep 'Q_OBJECT' $file >/dev/null 2>&1 - if [ $? -eq 0 ]; then - echo " qt4_generate_moc( ${BASE}.h ${BASE}.moc )" - MOC_FILES="${BASE}.moc $MOC_FILES" - fi - done - for file in `ls *.cc *.cp *.cxx *.cpp *.CPP *.c++ *.C 2> /dev/null | sort` ; do - BASE=`basename $file .cc` - BASE=`basename $BASE .cp` - BASE=`basename $BASE .cxx` - BASE=`basename $BASE .cpp` - BASE=`basename $BASE .CPP` - BASE=`basename $BASE .c++` - BASE=`basename $BASE .C` - egrep 'Q_OBJECT' $file >/dev/null 2>&1 - if [ $? -eq 0 ]; then - echo " qt4_generate_moc( ${BASE}.cpp ${BASE}.moc )" - MOC_FILES="${BASE}.moc $MOC_FILES" - fi - done - - #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv - cat << 'EOF' - -endif() -EOF - #----------------------------------------------------------------------- - - all="${all} ${MOC_FILES} \${DT_UI_FILES} \${DT_RESOURCE_FILES}" - - fi # qt4 - # no 'cat' here, as variable substitution required echo echo "add_executable( ${target_name} ${all} )" @@ -480,7 +358,7 @@ usage() echo "Usage: `basename $0` [-s source] [-c cgal-component1:cgal-component2:...] [-b boost-component1:boost-component2:...] [-p] [-o options_file='`pwd`/cgal_cmake_options:$HOME/.cgal_cmake_options_rc'] [-v] [-h]" >&2 echo >&2 echo " -s source If this parameter is given the script will create one single executable for 'source' with all source files; otherwise it creates one executable for each main'ed source." >&2 - echo " cgal_componentX - must be a valid cgal component, examples are 'Core','ImageIO','Qt4' ('benchmark', 'symbolic')." >&2 + echo " cgal_componentX - must be a valid cgal component, examples are 'Core','ImageIO' ('benchmark', 'symbolic')." >&2 echo " boost_componentX - must be a valid boost component, like 'filesystem', 'program_options'." >&2 echo " -o options_file - file with PACKAGE, DIRECTORY, CGAL_COMPONENT, and BOOST_COMPONENT directives" >&2 echo " -v the version" >&2 diff --git a/Stream_support/src/CGAL/Color.cpp b/Stream_support/src/CGAL/Color.cpp deleted file mode 100644 index d2e0380858a..00000000000 --- a/Stream_support/src/CGAL/Color.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 1997 -// Utrecht University (The Netherlands), -// ETH Zurich (Switzerland), -// INRIA Sophia-Antipolis (France), -// Max-Planck-Institute Saarbruecken (Germany), -// and Tel-Aviv University (Israel). All rights reserved. -// -// This file is part of CGAL (www.cgal.org) -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : Andreas Fabri, Hervé Brönnimann - -#ifndef CGAL_HEADER_ONLY - -#include - -#endif // CGAL_HEADER_ONLY diff --git a/Stream_support/src/CGAL/File_header_OFF.cpp b/Stream_support/src/CGAL/File_header_OFF.cpp deleted file mode 100644 index a014e1887d4..00000000000 --- a/Stream_support/src/CGAL/File_header_OFF.cpp +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 1997 -// Utrecht University (The Netherlands), -// ETH Zurich (Switzerland), -// INRIA Sophia-Antipolis (France), -// Max-Planck-Institute Saarbruecken (Germany), -// and Tel-Aviv University (Israel). All rights reserved. -// -// This file is part of CGAL (www.cgal.org) -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : Lutz Kettner - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY - -// EOF // diff --git a/Stream_support/src/CGAL/File_header_extended_OFF.cpp b/Stream_support/src/CGAL/File_header_extended_OFF.cpp deleted file mode 100644 index 0d9936d3e13..00000000000 --- a/Stream_support/src/CGAL/File_header_extended_OFF.cpp +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 1997 -// Utrecht University (The Netherlands), -// ETH Zurich (Switzerland), -// INRIA Sophia-Antipolis (France), -// Max-Planck-Institute Saarbruecken (Germany), -// and Tel-Aviv University (Israel). All rights reserved. -// -// This file is part of CGAL (www.cgal.org) -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -// -// -// Author(s) : Lutz Kettner - -#ifndef CGAL_HEADER_ONLY - -#include -#include - -#endif // CGAL_HEADER_ONLY - -// EOF // diff --git a/Testsuite/test/collect_cgal_testresults_from_cmake b/Testsuite/test/collect_cgal_testresults_from_cmake index 1aa8768de40..2587aca5edb 100755 --- a/Testsuite/test/collect_cgal_testresults_from_cmake +++ b/Testsuite/test/collect_cgal_testresults_from_cmake @@ -9,8 +9,8 @@ if [ -z "${CGAL_TEST_PLATFORM}" ]; then - - CGAL_TEST_PLATFORM=`dirname $PWD` + + CGAL_TEST_PLATFORM=`dirname $PWD` echo "CGAL_TEST_PLATFORM not in the environment, setting it to ${CGAL_TEST_PLATFORM}" fi @@ -24,7 +24,6 @@ GENERAL_BUILD_LOGFILE='' PLATFORM_BUILD_LOGFILE='' TEST_REPORT='' RESULT_FILE='' -shared_or_static='' #print_testresult # print result on stdout @@ -53,12 +52,12 @@ print_testresult() then RESULT="w" else - if grep -E -q 'NOTICE: .*(need|require|incompatible).*and.*will not be' CompilerOutput_$1 - then - RESULT="r" + if grep -E -q 'NOTICE: .*(need|require|incompatible).*and.*will not be' CompilerOutput_$1 + then + RESULT="r" else RESULT="y" - fi + fi fi fi TIMING=`awk '/^ # Running time: / {print $4}' < ErrorOutput_$1` @@ -67,81 +66,19 @@ print_testresult() echo "$2 $RESULT" } - -parse_shared_or_static() -{ - if [ -f "${PLATFORM_BUILD_LOGFILE}" ] ; then - - if grep "Building shared libraries" ${PLATFORM_BUILD_LOGFILE} >/dev/null 2>&1; then - shared_or_static='shared' - else - shared_or_static='static' - fi - - else - shared_or_static='shared' - fi -} - parse_flags_and_third_party_choices() { - grep -e "^-- USING " ${PLATFORM_BUILD_LOGFILE} >> $RESULT_FILE + grep -e "^-- USING " ${PLATFORM_BUILD_LOGFILE} >> $RESULT_FILE echo "------------" >> $RESULT_FILE } -parse_lib_building_results() -{ - libname=$1 - target=$2 - - if [ ! -e "${libname}_${shared_or_static}" ]; then - mkdir "${libname}_${shared_or_static}" - fi - - y_or_no='n' - - configured='' - - if [ -f "${PLATFORM_BUILD_LOGFILE}" ]; then - - if grep -q "Built target ${target}" ${PLATFORM_BUILD_LOGFILE} ; then - y_or_no='y' - fi - - marker_beg=`grep -e "${target}.dir/depend$" ${PLATFORM_BUILD_LOGFILE} | head -1` - - if [ -n "${marker_beg}" ]; then - - configured='y' - - if [ ! "$target" = "CGAL" ]; then - cat ${PLATFORM_BUILD_LOGFILE} | sed -n "\|${marker_beg}|,\|depend$| p" >> ${libname}_${shared_or_static}/$TEST_REPORT - fi - - # Test if there is a warning in the build log. - if [ "$y_or_no" = "y" ]; then - # See the comment line 38. - if grep -i -E -q '(^|[^a-zA-Z_,:-])warning' ${libname}_${shared_or_static}/$TEST_REPORT ; then - y_or_no='w' - fi - fi - fi - fi - - if [ -z "${configured}" ] ; then - y_or_no='r' - echo "Not configured!" >> ${libname}_${shared_or_static}/$TEST_REPORT - fi - - echo ${libname}_${shared_or_static} $y_or_no >> $RESULT_FILE -} output_main_logs() { [ -e Installation ] || mkdir "Installation" - + INSTALLATION_TEST_REPORT="Installation/$TEST_REPORT" - + echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" echo " General Build Log " >> "$INSTALLATION_TEST_REPORT" echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" @@ -149,9 +86,9 @@ output_main_logs() if [ -f "${GENERAL_BUILD_LOGFILE}" ] ; then cat "${GENERAL_BUILD_LOGFILE}" >> "$INSTALLATION_TEST_REPORT" else - echo "Not found!" >> "$INSTALLATION_TEST_REPORT" + echo "Not found!" >> "$INSTALLATION_TEST_REPORT" fi - + echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" echo " Platform-specific Build Log " >> "$INSTALLATION_TEST_REPORT" echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" @@ -159,9 +96,9 @@ output_main_logs() if [ -f "${PLATFORM_BUILD_LOGFILE}" ] ; then cat "${PLATFORM_BUILD_LOGFILE}" >> "$INSTALLATION_TEST_REPORT" else - echo "Not found!" >> "$INSTALLATION_TEST_REPORT" + echo "Not found!" >> "$INSTALLATION_TEST_REPORT" fi - + if [ -f "$HOME/.autocgal_with_cmake_rc" ] ; then echo "" >> "$INSTALLATION_TEST_REPORT" echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" @@ -179,7 +116,7 @@ output_main_logs() cat "$HOME/.autocgalrc" >> "$INSTALLATION_TEST_REPORT" fi fi - + if [ -f "../setup" ] ; then echo "" >> "$INSTALLATION_TEST_REPORT" echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" @@ -188,8 +125,8 @@ output_main_logs() echo "" >> "$INSTALLATION_TEST_REPORT" cat "../setup" >> "$INSTALLATION_TEST_REPORT" fi - - + + echo "" >> "$INSTALLATION_TEST_REPORT" echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" echo " CMakeCache.txt" >> "$INSTALLATION_TEST_REPORT" @@ -198,9 +135,9 @@ output_main_logs() if [ -f "../CMakeCache.txt" ] ; then cat "../CMakeCache.txt" >> "$INSTALLATION_TEST_REPORT" else - echo "Not found!" >> "$INSTALLATION_TEST_REPORT" + echo "Not found!" >> "$INSTALLATION_TEST_REPORT" fi - + echo "" >> "$INSTALLATION_TEST_REPORT" echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" echo " include/CGAL/compiler_config.h" >> "$INSTALLATION_TEST_REPORT" @@ -209,9 +146,9 @@ output_main_logs() if [ -f "../include/CGAL/compiler_config.h" ] ; then cat "../include/CGAL/compiler_config.h" >> "$INSTALLATION_TEST_REPORT" else - echo "Not found!" >> "$INSTALLATION_TEST_REPORT" + echo "Not found!" >> "$INSTALLATION_TEST_REPORT" fi - + echo "" >> "$INSTALLATION_TEST_REPORT" echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" echo " CGALConfig.cmake" >> "$INSTALLATION_TEST_REPORT" @@ -220,9 +157,9 @@ output_main_logs() if [ -f "../CGALConfig.cmake" ] ; then cat "../CGALConfig.cmake" >> "$INSTALLATION_TEST_REPORT" else - echo "Not found!" >> "$INSTALLATION_TEST_REPORT" + echo "Not found!" >> "$INSTALLATION_TEST_REPORT" fi - + echo "" >> "$INSTALLATION_TEST_REPORT" echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" echo " CMakeError.log" >> "$INSTALLATION_TEST_REPORT" @@ -231,9 +168,9 @@ output_main_logs() if [ -f "../CMakeFiles/CMakeError.log" ] ; then cat "../CMakeFiles/CMakeError.log" >> "$INSTALLATION_TEST_REPORT" else - echo "Not found!" >> "$INSTALLATION_TEST_REPORT" + echo "Not found!" >> "$INSTALLATION_TEST_REPORT" fi - + echo "" >> "$INSTALLATION_TEST_REPORT" echo "---------------------------------------------------------------" >> "$INSTALLATION_TEST_REPORT" echo " CMakeOutput.log" >> "$INSTALLATION_TEST_REPORT" @@ -242,9 +179,9 @@ output_main_logs() if [ -f "../CMakeFiles/CMakeOutput.log" ] ; then cat "../CMakeFiles/CMakeOutput.log" >> "$INSTALLATION_TEST_REPORT" else - echo "Not found!" >> "$INSTALLATION_TEST_REPORT" + echo "Not found!" >> "$INSTALLATION_TEST_REPORT" fi - + } echo "---------------------------------------------------------------" @@ -271,17 +208,10 @@ echo "CGAL_TEST_PLATFORM ${CGAL_TEST_PLATFORM}" >> "$RESULT_FILE" echo "General installation log file: ${GENERAL_BUILD_LOGFILE}" >> "$RESULT_FILE" echo "Host-specific installation log file: ${PLATFORM_BUILD_LOGFILE}" >> "$RESULT_FILE" -parse_shared_or_static - -output_main_logs +output_main_logs parse_flags_and_third_party_choices -parse_lib_building_results "libCGAL" "CGAL" -parse_lib_building_results "libCGALCore" "CGAL_Core" -parse_lib_building_results "libCGALimageIO" "CGAL_ImageIO" -parse_lib_building_results "libCGALQt5" "CGAL_Qt5" - for DIR in $TEST_DIRECTORIES ; do if [ -d "$DIR" ] ; then echo " $DIR ..."