Commit Graph

77 Commits

Author SHA1 Message Date
Maxime Gimeno 39f97ca56b remove NOT CGAL_HEADER_ONLY 2020-10-05 15:44:05 +02:00
Laurent Rineau c28c0a4b2d Fix a bug with CTest in non-header-only
The pull-request https://github.com/CGAL/cgal/pull/3413 has introduced
a side-effect: CTest was broken when `CGAL_HEADER_ONLY=OFF`, for all
tests using a `.cin` or `.cmd` file. That is due to the variable
`CGAL_CURRENT_SOURCE_DIR` that was only filled by `UseCGAL.cmake`.

Now that we forbid CGAL directories without `CMakeLists.txt`, that
variable `CGAL_CURRENT_SOURCE_DIR` is now useless, and can be removed:
`CMAKE_CURRENT_SOURCE_DIR` is sufficient. That fixes the bug with
CTest, and also makes the CMake code a bit simpler.
2018-11-19 14:33:54 +01:00
Laurent Rineau d03f76cd78 Remove that annoying warning
When a user-project is compile from a Git repository, there was that
annoying warning about the project not being developed in the same branch
as CGAL itself!
2018-05-15 14:56:22 +02:00
Laurent Rineau b4534f51b4 Remove the duplicate -DCGAL_HEADER_ONLY 2018-03-14 23:06:01 +01:00
Laurent Rineau 69ca424c5e Add CGAL_DEV_MODE 2018-02-06 15:08:54 +01:00
Laurent Rineau 249aed9fd1 Hack for the CGAL test suite 2017-11-23 17:06:47 +01:00
Laurent Rineau ce9399d423 Display compiler and linker flags 2017-11-23 17:06:46 +01:00
Laurent Rineau 8a260c4c32 Remove CGAL setup flags
@afabri This commit removes our tricks with the compilation flags.
2017-11-17 12:57:12 +01:00
Laurent Rineau 3f3f5b1a52 Do not rely on CMAKE_MODULE_PATH 2017-11-15 14:45:12 +01:00
Laurent Rineau c6068691fa Merge pull request #2547 from lrineau/CMake-parse_CTest_XML_output-lrineau
CGAL testsuite implemented with CTest plus Python (part.1)
2017-11-13 11:13:54 +01:00
Laurent Rineau c25e4997ef Fix the indentation 2017-06-15 17:38:34 +02:00
Thomas "elfprince13" Dickerson 0d13f433f7 flag to prevent blanking linking flags from being applied 2017-06-13 19:03:16 -04:00
Laurent Rineau 7c97443e37 Add a backward compatibility
A few CMakeLists.txt modify `CGAL_3RD_PARTY_LIBRARIES` to add Boost or
TBB libraries to it. In this case, emit a `DEPRECATION` warning and do
link with `${CGAL_3RD_PARTY_LIBRARIES}`.
2017-03-27 18:04:54 +02:00
Laurent Rineau 9902457b0a Make CGAL_SCM.cmake define a function
... instead of launching the code. That will help launch it on other
directories.
2017-03-27 17:23:27 +02:00
Laurent Rineau f9835007e5 Use CGAL::CGAL instead of CGAL 2017-03-27 17:23:26 +02:00
Laurent Rineau 545e80f18e Add a variable CGAL_CURRENT_SOURCE_DIR
Save the current source directory to `CGAL_CURRENT_SOURCE_DIR`. The
variable value is modified by a `CMakeLists.txt` file when it is
generated by `cgal_create_cmake_script` in the binary tree. The script
`cgal_create_cmake_script` itself it called by CMake, by the function
`process_CGAL_subdirectory` (see its definition in
`Installation/cmake/modules/CGAL_Macros.cmake`), called in
`(examples|test|demo)/CMakeLists.txt`.

Eventually, that variable value is supposed to be the directory to the
current sources, even if the current `CMakeLists.txt` is within the
binary tree.

That is used in `CGAL_CreateSingleSourceCGALProgram.cmake` for the CTest
support, so set correctly the current working directory (in the
directory of the tests/examples).
2016-09-20 10:53:20 +02:00
Guillaume Damiand b507b12d4f Do not add in link_libraries in header only mode. 2016-06-01 19:18:43 +02:00
Guillaume Damiand b9d209ee62 Search required third party library in find component macro. 2016-03-09 12:41:42 +01:00
Guillaume Damiand 94f2565c6a Replace the name of the variable to enable header only mode in CGAL_HEADERS_ONLY 2016-03-09 10:56:11 +01:00
Guillaume Damiand d56092753a Make enable_header_only option persistent 2016-03-09 10:35:21 +01:00
Philipp Möller 4211a4f01e Globally remove CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS
This is a Cmake 2.4.3 variable that isn't even documented anymore.
2016-02-16 17:02:55 +01:00
Philipp Möller 33a1fdbcbc Replace CGAL_LIBRARY with the actual CGAL target
The variable CGAL_LIBRARY is no longer defined within the build as it is
completely unnecessary and using the actual target allows more features.
2015-07-03 12:30:23 +02:00
Laurent Rineau 151844059a Fix a typo (found by Mael) 2013-10-29 16:19:15 +01:00
Laurent Rineau 85eeaca873 Link with the CGAL *target* we possible (instead of linking with the library)
That is a late follow-up to the following commit:

  | commit 12744ab7ff
  | Author: Laurent Rineau <Laurent.Rineau__CGAL@normalesup.org>
  | Date:   Thu Apr 28 13:11:09 2011 +0000
  |
  |     Track dependencies between libraries and examples/demos
  |
  |     With this patch, when CGAL as been configured with WITH_examples and/or
  |     WITH_demos, then the executables of examples and demos depends on the CGAL
  |     libraries. That means if one change a file involved in a CGAL library, and
  |     ask the rebuild of an executable, then the CGAL library will be rebuilt
  |     first.
  |
  | Notes:
  |     r63187 branches/next

Or maybe the bug was re-introduced by recent modifications of our CMake
scripts.
2013-08-20 15:45:29 +02:00
Eric Berberich 6eafd776c7 readded link_libraries 2012-12-27 20:01:56 +01:00
Eric Berberich 03ac16f071 whitespace for git 2012-10-23 23:27:34 +00:00
Eric Berberich fe43dd0171 better handling if source of executable is not in a git repo 2012-10-22 23:38:25 +00:00
Eric Berberich fc6d74c399 raise a CMake AUTHOR_WARNING if current branch does not match branch used to install cgal 2012-10-22 23:10:57 +00:00
Eric Berberich 357d6258f5 cmake's link_libraries is deprecated
removed almost all occurenced (missing UseFiles). While
doing so, some CMakeLists.txt could also be simplified. In fact
many more CMakeLists.txt can be simplified, in one of two ways:
1) add external libs to CGAL_3RD_PARTY_LIBRARIES and
2) call cgal_create_single_source_program
2012-08-03 22:32:39 +00:00
Laurent Rineau 8e167590c8 Use include_directories(SYSTEM ...) for 3rd-party libraries
gcc has an option -isystem, that can replace -I. The documentation is:

 -isystem dir

     Search dir for header files, after all directories specified by -I but
     before the standard system directories. Mark it as a system directory,
     so that it gets the same special treatment as is applied to the
     standard system directories. If dir begins with "=", then the "=" will
     be replaced by the sysroot prefix; see --sysroot and -isysroot.


The "special treatment" means that gcc will not warn about constructions in
headers in directories pointed by -isystem instead of -I.

In the CGAL testsuite, there are a lot of warnings that comes from
third-party libraries (mostly from Boost, but also from Eigen).

This patch tells cmake to use -isystem with gcc, for all CGAL 3rd-party
directories.
2012-08-01 10:53:37 +00:00
Eric Berberich 3a7ad3baaa mandatory -> essential 2012-06-29 15:27:45 +00:00
Eric Berberich b5a4e941fd the mandatory libs need an particular order, and we simplify with a macro 2012-06-29 09:24:19 +00:00
Eric Berberich eb6c435c4a correct spelling of GMPXX_FOUND variable
FOUND_GMPXX -> GMPXX_FOUND
2012-06-28 13:02:32 +00:00
Eric Berberich dc2fb9242a make GMP+MPFR mandatory 2012-01-31 10:47:45 +00:00
Eric Berberich 832c6c02e7 merge from next; installation.tex got major changes 2012-01-23 13:54:58 +00:00
Eric Berberich dfd8e8ed64 distinguish internal libs and external libs as COMPONENTS 2012-01-11 01:32:56 +00:00
Eric Berberich 0def3cb179 improved formatting 2012-01-10 10:17:43 +00:00
Eric Berberich 66bc1cef1e merge from next 2012-01-09 12:42:00 +00:00
Laurent Rineau 06c96d91ce Do not include CGAL include dirs *before* user ones!! 2011-12-07 10:49:43 +00:00
Laurent Rineau fcc0874c59 Do NOT include CGAL_INCLUDE_DIRS before!
We want, for example, to have CMAKE_BINARY_DIR/include before those dirs.
2011-10-21 14:44:53 +00:00
Laurent Rineau 6985effcc8 Fix the CMake module CGAL_SetupBoost shipped with CGAL
CGAL_Boost_USE_STATIC_LIBS is now an (advanced) CMake option on all
platforms, and is stored in the generated CGALConfig.cmake. That way, its
value is proposed as the default value for the same option when programs
using CGAL are configured using CMake.

The script UseCGAL includes the module CGAL_TweakFindBoost, to define
Boost_USE_STATIC_LIBS and Boost_ADDITIONAL_VERSIONS.
2011-10-12 13:47:18 +00:00
Laurent Rineau dbf3ace24b merge from next 2011-09-22 07:56:49 +00:00
Eric Berberich a54f16d874 fixed include order 2011-04-29 12:36:03 +00:00
Eric Berberich bcdc7c3771 merge from next 2011-04-28 21:35:58 +00:00
Laurent Rineau 12744ab7ff Track dependencies between libraries and examples/demos
With this patch, when CGAL as been configured with WITH_examples and/or
WITH_demos, then the executables of examples and demos depends on the CGAL
libraries. That means if one change a file involved in a CGAL library, and
ask the rebuild of an executable, then the CGAL library will be rebuilt
first.
2011-04-28 13:11:09 +00:00
Eric Berberich 2bced23597 moved ${CGAL_LIB}_FOUND to config file 2011-04-24 08:15:42 +00:00
Eric Berberich abec32922e added fix 2011-04-22 15:23:33 +00:00
Eric Berberich 15b31230a7 added option CGAL_ALLOW_ALL_PRECONFIGURED_LIBS_COMPONENT 2011-04-21 14:25:13 +00:00
Eric Berberich 72e82d7e9a fixed usages for Prefix 2011-04-20 15:24:59 +00:00
Eric Berberich fba0d339e7 cleanup 2011-04-20 10:17:01 +00:00