Commit Graph

403 Commits

Author SHA1 Message Date
Laurent Rineau 909691f77c Add support for VC12 (and VC13) 2014-02-11 16:18:39 +01:00
Andreas Fabri 2860662f77 Merge branch 'Installation-visual_leak_detector-lrineauTMP' into Installation-visual_leak_detector-lrineau 2013-11-19 14:46:39 +01:00
Laurent Rineau 151844059a Fix a typo (found by Mael) 2013-10-29 16:19:15 +01:00
Laurent Rineau 9211e0eb2a Sort of bug-fix: unhide an important CMake variable 2013-09-16 14:30:06 +02:00
Andreas Fabri 78a3de4955 Search for taucs.h and not for the directory auxiliary/taucs/include
This leads to false positives
(cherry picked from commit a5d9d001aa995c4a66d73a40cbc6a1a22b795d4d)

Message added by Laurent Rineau:

  that commit was tested in CGAL-4.3-Ic-168
2013-09-12 12:01:39 +02:00
Laurent Rineau ea6e24200c Allow the use of Visual Leak Detector
See the small feature [[Small features/Visual_Leak_Detector]] in CGAL
developers wiki:
  https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/Visual_Leak_Detector

See also:
  http://vld.codeplex.com/
2013-09-11 12:25:01 +02: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
Laurent Rineau e724c1f519 Fix end-of-lines and end-of-files 2013-07-04 11:51:23 +02:00
Clement Jamin 8b0edee1f4 Merge branch 'concurrency_in_cgal-cjamin-old' into concurrency_in_cgal-cjamin 2013-07-03 17:17:34 +02:00
Clement Jamin 4d0c6a6bb0 Better FindTBB.cmake which works even if the debug version is not found
If the debug versions are not found, the release versions will be used instead
for the debug mode.
If the tbb_malloc library is not found, doesn't link with it.
2013-07-03 16:48:10 +02:00
Clement Jamin 9c57c17a34 Bugfix for TBB_LIBRARY_DIRS 2013-07-03 12:28:50 +02:00
Clement Jamin 3dfb28141f Mark TBB_MALLOCPROXY_XXX_LIBRARY as advanced in CMake 2013-06-28 17:55:12 +02:00
Clement Jamin da77b4d879 Correct FindTBB.cmake + add a UseTBB.cmake 2013-06-27 16:50:55 +02:00
Clement Jamin 90d0125741 Improved FindTBB.cmake
- Untabified
- Does not link with the TBB mallow proxy anymore, but set
  TBB_MALLOCPROXY_DEBUG_LIBRARY and TBB_MALLOCPROXY_RELEASE_LIBRARY
  so that a user can still link with it if necessary
  Note: the malloc proxy is not available on MacOS.
- Calls include_directories ( ${TBB_INCLUDE_DIRS} ) and
  link_directories( ${TBB_LIBRARY_DIRS} ) to set paths
2013-06-27 15:54:39 +02:00
Laurent Rineau 723a257a73 Merge branch 'Installation-tweak_FindEigen-lrineau' 2013-04-26 15:40:54 +02:00
Laurent Rineau bf39cc5e7c Add new names for leda libraries in FindLEDA.cmake
Under Windows, the libraries can be named leda_md and leda_mdd (debug).
2013-04-25 11:01:45 +02:00
Laurent Rineau c6c0a606ce Remove the variable Boost_DIR from the CMake cache
The CMake module FindBoost.cmake searchs for Boost first in the "Config
mode" of 'find_package'. That allows to find installation of boost-cmake
(that is Boost configured using CMake). That configuration of Boost is
rather rare. But the search for it leaves a variable Boost_DIR=NOTFOUND in
the cache, even if Boost libraries are found using the regular way.

That patch removes from the cache the variable Boost_DIR, when Boost is
already found, to avoid more confusion for users.
2013-03-18 16:17:04 +01:00
Laurent Rineau 92f464232a Allow to add CGAL_DISABLE_GMP lately in the cache 2013-03-15 16:39:59 +01:00
Andreas Fabri 02bb200fe5 Add a CMake variable that allows to disable GMP/MPFR 2013-03-15 14:11:34 +01:00
Laurent Rineau c0039287df Fix the detection of BLAS/LAPACK/TAUCS with MSVC
The CMake script was only testing if the sub-directory auxiliary/taucs/
existed. That directory exists in Git for a while, because we ship a README
file in it. Now the CMake script checks for auxiliary/taucs/include/. That
is as naive as before but at least it will work.
2013-03-05 13:54:51 +01:00
Laurent Rineau a2c9ee5c43 Enhance FindEigen3
1/ Check the version using 'find_package_handle_standard_args' internal
checking of version, instead of a home-made check.

2/ No need to add EIGEN3_INCLUDE_DIR in the cache, as find_path does it.

3/ Call 'find_package_handle_standard_args' even if EIGEN3_INCLUDE_DIR is
already and valid in the cache.
2013-02-28 12:44:30 +01:00
Clement Jamin 0a89951884 Updated FindTBB.cmake so that it uses the "optimized"/"debug" cmake keywords 2013-01-23 15:14:08 +01:00
Clement Jamin 0fcd19db7a Updated FindTBB so that it looks for the malloc proxy + better error messages 2013-01-22 14:50:01 +01:00
Clement Jamin 5f7d4bd88d Original FindTBB.cmake file 2013-01-22 14:42:13 +01:00
Laurent Rineau 291b3029bb Fix a bug in CGAL_SCM.cmake when the HEAD is not a branch
If the current working directory is a checkout of a commit that is not a
branch, for example, a commit in the ancestors of a branch, then CGAL CMake
scripts gave that CMake error:

  == CMake setup ==
  fatal: ref HEAD is not a symbolic ref
  CMake Error at Installation/cmake/modules/CGAL_SCM.cmake:36 (string):
    string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
    command.
  Call Stack (most recent call first):
    CMakeLists.txt:17 (include)

  == CMake setup (DONE) ==

This patch fixes the error. If HEAD is not a branch, then CGAL_GIT_BRANCH
is equal to "HEAD".
2013-01-21 17:23:36 +01:00
Laurent Rineau 3b1ba8ba70 Merge remote-tracking branch 'origin/Installation-link_libraries_deprecated-eric' 2013-01-14 14:50:59 +01:00
Eric Berberich 03c6c56549 not necessarily a CGAL_-UseFile 2012-12-28 18:55:50 +01:00
Eric Berberich 6eafd776c7 readded link_libraries 2012-12-27 20:01:56 +01:00
Laurent Rineau aa3d26e96c Merge branch 'Installation-CreateSingleSourceCGALProgram_warning-lrineau' 2012-12-05 11:42:09 +01:00
Philipp Möller 1adf441b18 Convert all CRLF files to LF 2012-12-03 18:44:24 +01:00
Laurent Rineau e33d05f919 Add a AUTHOR_WARNING if the source file does not exist. 2012-11-30 10:34:29 +01:00
Philipp Möller 3d253a0edd Add CGAL_GIT_HASH and provide defaults for all variables 2012-11-15 13:20:37 +01:00
Eric Berberich ddd4ca95da fix if git dir is already given dir 2012-11-13 16:20:07 +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 358b8bb92b search for git parent dir + commented some verbosity 2012-10-22 23:09:58 +00:00
Eric Berberich 25f3fb6e2e remove SVN, refactored SCM code to CGAL_SCM.cmake
(plan is to reuse it UseCGAL.cmake)
2012-10-22 22:39:36 +00:00
Eric Berberich 1d59758d89 add an additional check for requested component and raise the "NOTICE" if lib is not build 2012-10-10 14:21:50 +00:00
Eric Berberich 7503d0ce5b merge from next 2012-10-08 09:57:49 +00:00
Eric Berberich 4cae227f10 NTL_VERSION can also be just \d.\d (regex was \d.\d.\d) 2012-10-05 22:34:46 +00:00
Eric Berberich 2bbc6c94a9 added missing { 2012-10-05 22:14:02 +00:00
Alexander Kobel e062c5f9e5 fixed PATH_SUFFIXES inconsistencies:
- proper indentation
- merge double occurences
- standardize location at the end block, before DOC

tested with GMP(XX), MPFR, MPFI, LEDA, RS(3), NTL and a (small) number of ways to specify library
locations via environment and CMake variables, on Debian 64bit
2012-10-05 12:40:10 +00:00
Alexander Kobel 461a23478d move detection whether additional LEDA flags are necessary to FindLEDA stage
only apply includes if UseLEDA is called
2012-10-04 13:28:51 +00:00
Alexander Kobel d3d82afd4a automatically add -ffriend-injection, -fno-strict-aliasing, -lX11 as required for LEDA 2012-10-04 12:07:42 +00:00
Alexander Kobel c06f84d4db fixed fallback to RS_dirs for RS3 2012-10-04 12:06:46 +00:00
Eric Berberich c81470929e fixed variable 2012-10-04 09:56:48 +00:00
Alexander Kobel 160e937500 try $ENV{<PKG>_DIR}/[include,lib] as a fallback for $ENV{<PKG>_[INC,LIB]_DIR} 2012-10-04 09:34:54 +00:00
Alexander Kobel 04f07ef7bf replace spurious *_LIBRARY_DIR occurences by *_LIBRARIES_DIR 2012-10-04 09:05:32 +00:00
Alexander Kobel bb5f4dc8e1 added evaluation of LEDA_LINKER_FLAGS 2012-10-04 09:00:46 +00:00
Eric Berberich b1481c43c8 ${lib} is now prefixed with name, which needed adaptions in loop
In addition: removed fake variable and thus simplified loop 
(needed to rename CGAL_INSTALLED_${lib}_LIBRARY to ${lib}_LIBRARY_INSTALLED)
2012-09-12 14:26:02 +00:00
Eric Berberich 80616feea6 added missing $ to copy content of variable 2012-08-20 08:10:20 +00:00
Laurent Rineau 640c7355ec Fix: was no longer working in out-of-source build! 2012-08-06 13:21:07 +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
Eric Berberich 5f524b0802 subdirectories in src finally get correct name 2012-08-03 17:21:30 +00:00
Laurent Rineau b22a86c1c1 Fix the CGALConfig.cmake that is installed, on Windows 2012-08-03 15:38:26 +00:00
Eric Berberich 2f6dae6bbb now I got it: it's not just the first argument, it's the first file
"first" is a little bit general name for a parameter, changed
to firstfile and added a comment about handling other files
2012-08-03 12:57:04 +00:00
Eric Berberich 293a072b43 make signatures consistent 2012-08-03 12:46:58 +00:00
Eric Berberich 05c4d0a28f be consistent in variable name 2012-08-03 12:23:40 +00:00
Laurent Rineau 4c3e1c3138 Fix mixed eol styles 2012-08-02 13:35:03 +00:00
Laurent Rineau 6e579584b3 Fix FindRS(3) modules
A FindFoobar module must not include a UseFoobar file. CGAL_UseRS3 now
includes CGAL_UseMPFI, and not FindRS and FindRS3.

+ Fix also a typo in a message of FindRS3.
2012-08-02 10:32:04 +00:00
Laurent Rineau 414182edbf Change the order of messages, to be coherent with CGAL_UseRS(3) 2012-08-02 10:02:34 +00:00
Laurent Rineau cf1ad35e79 Better formatting of the documentation of GMP CMake modules 2012-08-02 09:50:24 +00:00
Laurent Rineau 514c1efad1 Make RS, MPFI, LEDA, and NTL optional essential libraries 2012-08-01 16:58:19 +00:00
Laurent Rineau 98992ea06b Use include_directories(SYSTEM ...) in the macro use_lib 2012-08-01 12:23:53 +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
Laurent Rineau 767899fa33 Revert some modifications made by error. 2012-07-31 16:41:10 +00:00
Laurent Rineau 20762313af Refresh the FindQt3-patched module, from CGAL, with recent changes
to the FindQt3 module shipped with CMake

CGAL FindQt3-patched module uses the prefix QT3_ for all cache variables,
instead of just QT_. That allows to use Qt3 and Qt4 in the same project
(but for different binaries of course).
2012-07-26 09:28:21 +00:00
Ophir Setter 628087b87a moc-qt3 to come before moc. Now, if moc is qt4 moc the cmake file will use the correct moc in Qt3 2012-07-26 07:08:26 +00:00
Philipp Möller f330095286 Add Boost.System to the CGAL dependencies
As of Boost 1.50 it is required to link Boost.System with CGAL. System
has been a Thread dependency all along and we simply never linked to
it and apparently got lucky.

Add it to the dependencies, add it in the manual and INSTALL file.
2012-07-24 10:02:57 +00:00
Eric Berberich 972f164184 correct handling of optional parameter for use_lib macro 2012-07-05 18:33:27 +00:00
Eric Berberich a488660748 rely on CMake list(FIND ...) instead of macro
Macro is nicer to use, but needs to be included and is less efficient.
To improve understanding: added comments
2012-06-29 23:13:43 +00:00
Eric Berberich 1d21969b14 revert use of macro and rely on list(FIND ...) 2012-06-29 22:53:42 +00:00
Eric Berberich 167783acde copy'n'paste works if the right includes exist: here missing CGAL_Macros
instead of including the file I've just added the general cmake makro to 
check whether an item is in the list. Why does it need a macro? There should 
be a list-operation for that ...
2012-06-29 22:22:25 +00:00
Eric Berberich 3a7ad3baaa mandatory -> essential 2012-06-29 15:27:45 +00:00
Eric Berberich d4cb1c2212 SetupDependicies needs also to check for essential lib (not just WITH_<lib>), side effect: mandatory->essential 2012-06-29 15:24:30 +00:00
Eric Berberich d0d6335a79 added Eigen3_FIND_VERSION to search for minimal version
CGAL_Common.cmake is included at a very early stage 
- when configuring CGAL but also
- when configuring demos etc
2012-06-29 12:51:02 +00:00
Eric Berberich 87ebf20f51 need a certain order 2012-06-29 09:39:40 +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
Laurent Rineau 160975eb12 Leftover of previous commit:
Second fix for Windows

On Windows, with auto-linking, the variables ${CGAL_LIB}_LIBRARY are
empty.

What is more, that is a bad idea to check if the libraries does exist. If
for example CGAL has been configured with WITH_CGAL_Qt4, and the CGAL_Qt4
library is not correctly created, we want a compilation error, and not just
a CMake warning saying "Please configure CGAL using WITH_${CGAL_LIB}=ON."
2012-06-28 15:57:29 +00:00
Laurent Rineau 483593826b Second fix for Windows
On Windows, with auto-linking, the variables ${CGAL_LIB}_LIBRARY are
empty.

What is more, that is a bad idea to check if the libraries does exist. If
for example CGAL has been configured with WITH_CGAL_Qt4, and the CGAL_Qt4
library is not correctly created, we want a compilation error, and not just
a CMake warning saying "Please configure CGAL using WITH_${CGAL_LIB}=ON."
2012-06-28 15:47:16 +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 3336c68671 fix for optional parameter 2012-06-28 12:47:13 +00:00
Eric Berberich df72a1aa08 macro use_lib now has an optional second parameter for UseFile
this avoids a nasty hack with checking for a leading ### in a string and 
allows to use "use_lib( FOO )" in other places much easier
2012-06-28 12:20:52 +00:00
Eric Berberich ee0fde5d13 re-added files probably used by external users 2012-06-28 12:03:12 +00:00
Laurent Rineau bccf95ba88 Add a comment for later in CGAL_Macros.cmake 2012-06-27 16:33:35 +00:00
Eric Berberich d4a6f27503 replace calls to UseESTBL 2012-06-26 23:52:07 +00:00
Eric Berberich 3ae59a513c removed verbosity 2012-06-21 22:07:04 +00:00
Eric Berberich 00330ee225 GMP and MPFR are mandatory 2012-06-21 21:57:42 +00:00
Eric Berberich 6b78ca27d6 use lib instead of vlib to be consitent with WITH_Lib 2012-06-21 14:54:46 +00:00
Sébastien Loriot d67be721d4 write prefix exception into config file and use default one otherwise for find_package 2012-06-21 14:27:35 +00:00
Sébastien Loriot 3efc565b71 bug in prefix setting 2012-06-21 12:42:08 +00:00
Sébastien Loriot b5ac8afe11 add comment 2012-06-21 12:04:22 +00:00
Sébastien Loriot c2240ede0e fix for ignoring preconfig 2012-06-21 09:53:03 +00:00
Sébastien Loriot 5dd3045330 move installation dir setup in demo script 2012-06-21 09:51:55 +00:00
Eric Berberich 4bdf466f9d Request by Sebastien Loriot: Ignore a preconfig lib 2012-06-21 07:58:51 +00:00
Sébastien Loriot e7e15113ef modification for IPE
->move the version check and the installation directory detection into the 
  demo CMakeLists.txt
2012-06-20 15:12:28 +00:00
Eric Berberich 3fde316a6c added CGAL_ENABLE_PRECONFIG (the default value has to be determined) 2012-06-20 11:16:17 +00:00
Sébastien Loriot 7b5902c9f6 default IPE_VERSION to AUTODETECT 2012-06-19 09:36:04 +00:00
Eric Berberich 94f7f0c3ab remove some verbosity 2012-06-11 22:06:08 +00:00