mirror of https://github.com/CGAL/cgal
Added user-side tests for components existence and behaviour
This commit is contained in:
parent
37d1466909
commit
0f6c7a4beb
|
|
@ -1767,6 +1767,13 @@ Installation/config/support/test_BOOST_THREAD.cpp -text
|
|||
Installation/config/testfiles/CGAL_CFG_NO_CPP0X_ISFINITE.cpp -text
|
||||
Installation/src/CGAL/all_files.cpp -text
|
||||
Installation/src/CMakeLists.txt -text
|
||||
Installation/test/Installation/CMakeLists.txt -text
|
||||
Installation/test/Installation/link_to_CGAL.cpp -text
|
||||
Installation/test/Installation/link_to_CGAL_Core.cpp -text
|
||||
Installation/test/Installation/link_to_CGAL_ImageIO.cpp -text
|
||||
Installation/test/Installation/link_to_CGAL_PDB.cpp -text
|
||||
Installation/test/Installation/link_to_CGAL_Qt3.cpp -text
|
||||
Installation/test/Installation/link_to_CGAL_Qt4.cpp -text
|
||||
Interpolation/doc_tex/Interpolation/nn_coords.eps -text svneol=unset#application/postscript
|
||||
Interpolation/doc_tex/Interpolation/nn_coords.gif -text svneol=unset#image/gif
|
||||
Interpolation/doc_tex/Interpolation/nn_coords.ipe -text svneol=unset#application/postscript
|
||||
|
|
|
|||
|
|
@ -0,0 +1,66 @@
|
|||
# Created by the script cgal_create_cmake_script
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
|
||||
project( Installation_test )
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.5)
|
||||
|
||||
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
|
||||
|
||||
macro(create_link_to_program COMPONENT )
|
||||
|
||||
add_executable(link_to_${COMPONENT} link_to_${COMPONENT}.cpp )
|
||||
|
||||
include_directories ( ${${COMPONENT}_3RD_PARTY_INCLUDE_DIRS} )
|
||||
|
||||
add_definitions( ${${COMPONENT}_3RD_PARTY_DEFINITIONS} )
|
||||
|
||||
link_directories( ${${COMPONENT}_3RD_PARTY_LIBRARIES_DIRS})
|
||||
|
||||
# Link the executable to CGAL and third-party libraries
|
||||
if ( AUTO_LINK_ENABLED )
|
||||
target_link_libraries(link_to_${COMPONENT} ${CGAL_3RD_PARTY_LIBRARIES} ${${COMPONENT}_3RD_PARTY_LIBRARIES} )
|
||||
else()
|
||||
target_link_libraries(link_to_${COMPONENT} ${${COMPONENT}_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${${COMPONENT}_3RD_PARTY_LIBRARIES} )
|
||||
endif()
|
||||
|
||||
endmacro()
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
if ( CGAL_FOUND )
|
||||
|
||||
include( ${CGAL_USE_FILE} )
|
||||
|
||||
include( CreateSingleSourceCGALProgram )
|
||||
|
||||
create_single_source_cgal_program( "endian.cpp" )
|
||||
|
||||
create_link_to_program(CGAL)
|
||||
|
||||
if ( WITH_CGAL_Core )
|
||||
create_link_to_program(CGAL_Core)
|
||||
endif()
|
||||
|
||||
if ( WITH_CGAL_ImageIO )
|
||||
create_link_to_program(CGAL_ImageIO)
|
||||
endif()
|
||||
|
||||
if ( WITH_CGAL_PDB )
|
||||
create_link_to_program(CGAL_PDB)
|
||||
endif()
|
||||
|
||||
if ( WITH_CGAL_Qt3 )
|
||||
create_link_to_program(CGAL_Qt3)
|
||||
endif()
|
||||
|
||||
if ( WITH_CGAL_Qt4 )
|
||||
create_link_to_program(CGAL_Qt4)
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
||||
message(STATUS "This program requires the CGAL library, and will not be compiled.")
|
||||
|
||||
endif()
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
// Use something defined not in headers but in the CGAL library to test that is was indeed properly built and linked to,
|
||||
|
||||
#include <CGAL/IO/Color.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
volatile const CGAL::Color* c = &CGAL::BLACK;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
// Use something defined not in headers but in the CGAL library to test that is was indeed properly built and linked to,
|
||||
|
||||
#include <CGAL/CORE/BigFloat.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
CORE::BigFloat n(1.2);
|
||||
|
||||
volatile double d = n.doubleValue();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
// Use something defined not in headers but in the CGAL library to test that is was indeed properly built and linked to,
|
||||
|
||||
#include <CGAL/ImageIO.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
volatile _image* i = _initImage();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
// Use something defined not in headers but in the CGAL library to test that is was indeed properly built and linked to,
|
||||
|
||||
#include <CGAL/PDB/PDB.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
std::ifstream in("");
|
||||
|
||||
volatile CGAL::PDB::PDB pdb(in,false);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
// Use something defined not in headers but in the CGAL library to test that is was indeed properly built and linked to,
|
||||
|
||||
#include <CGAL/IO/pixmaps/alpha_shape.xpm>
|
||||
|
||||
int main()
|
||||
{
|
||||
volatile const char * xpm = alpha_shape_xpm[0] ;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
// Use something defined not in headers but in the CGAL library to test that is was indeed properly built and linked to,
|
||||
|
||||
#include <CGAL/Qt/utility.h>
|
||||
|
||||
typedef QRectF (*mapToSceneFunction)(const QGraphicsView* , const QRect);
|
||||
|
||||
int main()
|
||||
{
|
||||
volatile mapToSceneFunction f = CGAL::Qt::mapToScene;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Reference in New Issue