Commit 74894aaf authored by root's avatar root
Browse files

version 0.7.8 with working setup file

parent fd029737
This diff is collapsed.
// Copyright (c) 1999-2004 INRIA Sophia-Antipolis (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you may redistribute it under
// the terms of the Q Public License version 1.0.
// See the file LICENSE.QPL distributed with CGAL.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/trunk/Triangulation_2/include/CGAL/Weighted_point.h $
// $Id: Weighted_point.h 59232 2010-10-14 13:52:18Z lrineau $
//
//
// Author(s) : Mariette Yvinec
// Sylvain Pion
#ifndef CGAL_WEIGHTED_POINT_H
#define CGAL_WEIGHTED_POINT_H
#include <iostream>
#include <CGAL/Kernel_traits.h>
#include <CGAL/Dimension.h>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/logical.hpp>
#include <boost/utility.hpp>
namespace CGAL {
template < class Pt, class We >
class Weighted_point : public Pt
{
typedef typename Kernel_traits<Pt>::Kernel::FT FT;
public:
typedef We Weight;
typedef Pt Point;
Weighted_point ()
: Point(), _weight(0) {}
//explicit
Weighted_point (const Point &p)
: Point(p), _weight(0)
{
// CGAL_error_msg( "Warning : truncated weight !!!");
}
Weighted_point (const Point &p, const Weight &w)
: Point(p), _weight(w), _index(-1) {}
Weighted_point (const Point &p, const Weight &w, const int index)
: Point(p), _weight(w), _index(index) {}
// Constructors from coordinates are also provided for convenience, except
// that they are only from Cartesian coordinates, and with no weight, so as
// to avoid any potential ambiguity between the homogeneous weight and the
// power weight (it should be easy enough to pass a Point explicitly in those
// cases).
// The enable_if complexity comes from the fact that we separate dimension 2 and 3.
template < typename Tx, typename Ty >
Weighted_point (const Tx &x, const Ty &y,
typename boost::enable_if< boost::mpl::and_<boost::is_convertible<Tx, FT>,
boost::is_convertible<Ty, FT>,
boost::mpl::bool_<CGAL::Ambient_dimension<Point>::value == 2> > >::type* = 0)
: Point(x, y), _weight(0) {}
template < typename Tx, typename Ty, typename Tz >
Weighted_point (const Tx &x, const Ty &y, const Tz &z,
typename boost::enable_if< boost::mpl::and_<boost::is_convertible<Tx, FT>,
boost::is_convertible<Ty, FT>,
boost::is_convertible<Tz, FT>,
boost::mpl::bool_<CGAL::Ambient_dimension<Point>::value == 3> > >::type* = 0)
: Point(x, y, z), _weight(0) {}
const Point & point() const
{
return *this;
}
const Weight & weight() const
{
return _weight;
}
const int & index() const
{
return _index;
}
// The following power() member functions are not used at the moment.
// They belong to the traits class anyway.
//
// Weight power(const Point &p)
// {
// return squared_distance(*this, p) - weight();
// }
//
// Weight power(const Weighted_point &p)
// {
// return squared_distance(*this, p) - weight() - p.weight();
// }
private:
Weight _weight;
int _index;
};
template < class Point, class Weight >
std::ostream &
operator<<(std::ostream &os, const Weighted_point<Point,Weight> &p)
{
switch(os.iword(IO::mode))
{
case IO::ASCII :
return os << p.point() << " " << p.weight();
case IO::BINARY :
os << p.point();
write(os, p.weight());
return os;
default:
return os << "Weighted_point(" << p.point() << ", " << p.weight() << ")";
}
}
template < class Point, class Weight >
std::istream &
operator>>(std::istream &is, Weighted_point<Point,Weight> &wp)
{
Weight w;
Point p;
is >> p;
if(is_ascii(is))
is >> w;
else
read(is, w);
if (is)
wp = Weighted_point<Point,Weight>(p,w);
return is;
}
} // namespace CGAL
#endif // CGAL_WEIGHTED_POINT_H
# Cmake config for NanoShaper
project(NanoShaper)
cmake_minimum_required(VERSION 2.6.2)
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
cmake_policy(VERSION 2.8.4)
else()
cmake_policy(VERSION 2.6)
endif()
endif()
include_directories (BEFORE include)
include_directories(src)
include_directories(src/ConfigFile)
include_directories(src/jama)
include_directories(src/tnt)
include_directories(src/sturm)
include_directories(src/octree)
# if cgal is found, boost is automatically found
find_package(CGAL)
file(GLOB SRC
"./src/*.h"
"./src/*.cpp")
if (CGAL_FOUND)
include( ${CGAL_USE_FILE} )
add_definitions(-DENABLE_CGAL)
add_definitions(-DENABLE_BOOST_THREADS)
find_package( Boost COMPONENTS thread system filesystem REQUIRED ) #whatever libs you need
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
if (${UNIX})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -mtune=native ")
endif (${UNIX})
add_executable(NanoShaper
./src/sturm/sturm.cpp
./src/sturm/util.cpp
./src/sturm/solve.h
${SRC}
./src/ply/ply.cpp
./src/ply/ply.h
./src/ConfigFile/ConfigFile.cpp
./src/ConfigFile/ConfigFile.h
./src/octree/octree.h
)
TARGET_LINK_LIBRARIES(NanoShaper ${Boost_LIBRARIES})
if (MSVC)
set_target_properties(NanoShaper PROPERTIES COMPILE_FLAGS "/wd4503")
#message(STATUS "Adding optimizations for processor ${CMAKE_SYSTEM_PROCESSOR}")
endif (MSVC)
else(CGAL_FOUND)
message(STATUS "CGAL not found, Skin Surface and Connolly Surface will be disabled")
if (${UNIX})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -mtune=native -lboost_system -lboost_filesystem")
endif (${UNIX})
find_package(Boost)
if (Boost_FOUND)
link_directories ( ${Boost_LIBRARY_DIRS} )
include_directories ( ${Boost_INCLUDE_DIRS} )
include_directories (BEFORE include)
add_definitions(-DENABLE_BOOST_THREADS)
else (Boost_FOUND)
message(STATUS "Boost libs not found, Multithreading will be disabled")
endif (Boost_FOUND)
if (MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif (MSVC)
if (CMAKE_COMPILER_IS_GNUCXX)
#...
endif (CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_C_COMPILER MATCHES "icc")
#..
endif ()
message(STATUS "C++ Release flags ${CMAKE_CXX_FLAGS_RELEASE}")
add_executable(NanoShaper ${SRC}
./src/ply/ply.cpp
./src/ply/ply.h
./src/ConfigFile/ConfigFile.cpp
./src/ConfigFile/ConfigFile.h
./src/sturm/sturm.cpp
./src/sturm/util.cpp
./src/sturm/solve.h
./src/octree/octree.h
)
endif(CGAL_FOUND)
# Cmake config for NanoShaper
project(NanoShaper)
cmake_minimum_required(VERSION 2.6.2)
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3)
cmake_policy(VERSION 2.8.4)
else()
cmake_policy(VERSION 2.6)
endif()
endif()
include_directories (BEFORE include)
include_directories(src)
include_directories(src/ConfigFile)
include_directories(src/jama)
include_directories(src/tnt)
include_directories(src/sturm)
include_directories(src/octree)
# if cgal is found, boost is automatically found
find_package(CGAL)
file(GLOB SRC
"./src/*.h"
"./src/*.cpp")
if (CGAL_FOUND)
include( ${CGAL_USE_FILE} )
add_definitions(-DENABLE_CGAL)
add_definitions(-DENABLE_BOOST_THREADS)
find_package( Boost COMPONENTS thread system filesystem REQUIRED ) #whatever libs you need
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
if (${UNIX})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -mtune=native ")
endif (${UNIX})
add_executable(NanoShaper
./src/sturm/sturm.cpp
./src/sturm/util.cpp
./src/sturm/solve.h
${SRC}
./src/ply/ply.cpp
./src/ply/ply.h
./src/ConfigFile/ConfigFile.cpp
./src/ConfigFile/ConfigFile.h
./src/octree/octree.h
)
TARGET_LINK_LIBRARIES(NanoShaper ${Boost_LIBRARIES})
if (MSVC)
set_target_properties(NanoShaper PROPERTIES COMPILE_FLAGS "/wd4503")
#message(STATUS "Adding optimizations for processor ${CMAKE_SYSTEM_PROCESSOR}")
endif (MSVC)
else(CGAL_FOUND)
message(STATUS "CGAL not found, Skin Surface and Connolly Surface will be disabled")
if (${UNIX})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -mtune=native -lboost_system -lboost_filesystem")
endif (${UNIX})
find_package(Boost)
if (Boost_FOUND)
link_directories ( ${Boost_LIBRARY_DIRS} )
include_directories ( ${Boost_INCLUDE_DIRS} )
include_directories (BEFORE include)
add_definitions(-DENABLE_BOOST_THREADS)
else (Boost_FOUND)
message(STATUS "Boost libs not found, Multithreading will be disabled")
endif (Boost_FOUND)
if (MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif (MSVC)
if (CMAKE_COMPILER_IS_GNUCXX)
#...
endif (CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_C_COMPILER MATCHES "icc")
#..
endif ()
message(STATUS "C++ Release flags ${CMAKE_CXX_FLAGS_RELEASE}")
add_executable(NanoShaper ${SRC}
./src/ply/ply.cpp
./src/ply/ply.h
./src/ConfigFile/ConfigFile.cpp
./src/ConfigFile/ConfigFile.h
./src/sturm/sturm.cpp
./src/sturm/util.cpp
./src/sturm/solve.h
./src/octree/octree.h
)
endif(CGAL_FOUND)
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canoncical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /opt/cmake/bin/cmake
# The command to remove a file.
RM = /opt/cmake/bin/cmake -E remove -f
# The program to use to edit the cache.
CMAKE_EDIT_COMMAND = /opt/cmake/bin/ccmake
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/alessia/NanoShaper0.7.8_VMD
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/alessia/NanoShaper0.7.8_VMD
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
/opt/cmake/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/opt/cmake/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# The main all target
all: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start /home/alessia/NanoShaper0.7.8_VMD/CMakeFiles /home/alessia/NanoShaper0.7.8_VMD/CMakeFiles/progress.marks
$(MAKE) -f CMakeFiles/Makefile2 all
$(CMAKE_COMMAND) -E cmake_progress_start /home/alessia/NanoShaper0.7.8_VMD/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
$(MAKE) -f CMakeFiles/Makefile2 clean
.PHONY : clean
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
$(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
$(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall/fast
# clear depends
depend:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
#=============================================================================
# Target rules for targets named NanoShaper
# Build rule for target.
NanoShaper: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 NanoShaper
.PHONY : NanoShaper
# fast build rule for target.
NanoShaper/fast:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/build
.PHONY : NanoShaper/fast
src/BlobbySurface.o: src/BlobbySurface.cpp.o
.PHONY : src/BlobbySurface.o
# target to build an object file
src/BlobbySurface.cpp.o:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/src/BlobbySurface.cpp.o
.PHONY : src/BlobbySurface.cpp.o
src/BlobbySurface.i: src/BlobbySurface.cpp.i
.PHONY : src/BlobbySurface.i
# target to preprocess a source file
src/BlobbySurface.cpp.i:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/src/BlobbySurface.cpp.i
.PHONY : src/BlobbySurface.cpp.i
src/BlobbySurface.s: src/BlobbySurface.cpp.s
.PHONY : src/BlobbySurface.s
# target to generate assembly for a file
src/BlobbySurface.cpp.s:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/src/BlobbySurface.cpp.s
.PHONY : src/BlobbySurface.cpp.s
src/ConfigFile/ConfigFile.o: src/ConfigFile/ConfigFile.cpp.o
.PHONY : src/ConfigFile/ConfigFile.o
# target to build an object file
src/ConfigFile/ConfigFile.cpp.o:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/src/ConfigFile/ConfigFile.cpp.o
.PHONY : src/ConfigFile/ConfigFile.cpp.o
src/ConfigFile/ConfigFile.i: src/ConfigFile/ConfigFile.cpp.i
.PHONY : src/ConfigFile/ConfigFile.i
# target to preprocess a source file
src/ConfigFile/ConfigFile.cpp.i:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/src/ConfigFile/ConfigFile.cpp.i
.PHONY : src/ConfigFile/ConfigFile.cpp.i
src/ConfigFile/ConfigFile.s: src/ConfigFile/ConfigFile.cpp.s
.PHONY : src/ConfigFile/ConfigFile.s
# target to generate assembly for a file
src/ConfigFile/ConfigFile.cpp.s:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/src/ConfigFile/ConfigFile.cpp.s
.PHONY : src/ConfigFile/ConfigFile.cpp.s
src/ConnollySurface.o: src/ConnollySurface.cpp.o
.PHONY : src/ConnollySurface.o
# target to build an object file
src/ConnollySurface.cpp.o:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/src/ConnollySurface.cpp.o
.PHONY : src/ConnollySurface.cpp.o
src/ConnollySurface.i: src/ConnollySurface.cpp.i
.PHONY : src/ConnollySurface.i
# target to preprocess a source file
src/ConnollySurface.cpp.i:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/src/ConnollySurface.cpp.i
.PHONY : src/ConnollySurface.cpp.i
src/ConnollySurface.s: src/ConnollySurface.cpp.s
.PHONY : src/ConnollySurface.s
# target to generate assembly for a file
src/ConnollySurface.cpp.s:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/src/ConnollySurface.cpp.s
.PHONY : src/ConnollySurface.cpp.s
src/DelphiShared.o: src/DelphiShared.cpp.o
.PHONY : src/DelphiShared.o
# target to build an object file
src/DelphiShared.cpp.o:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/src/DelphiShared.cpp.o
.PHONY : src/DelphiShared.cpp.o
src/DelphiShared.i: src/DelphiShared.cpp.i
.PHONY : src/DelphiShared.i
# target to preprocess a source file
src/DelphiShared.cpp.i:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/src/DelphiShared.cpp.i
.PHONY : src/DelphiShared.cpp.i
src/DelphiShared.s: src/DelphiShared.cpp.s
.PHONY : src/DelphiShared.s
# target to generate assembly for a file
src/DelphiShared.cpp.s:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/src/DelphiShared.cpp.s
.PHONY : src/DelphiShared.cpp.s
src/ExampleSurface.o: src/ExampleSurface.cpp.o
.PHONY : src/ExampleSurface.o
# target to build an object file
src/ExampleSurface.cpp.o:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/src/ExampleSurface.cpp.o
.PHONY : src/ExampleSurface.cpp.o
src/ExampleSurface.i: src/ExampleSurface.cpp.i
.PHONY : src/ExampleSurface.i
# target to preprocess a source file
src/ExampleSurface.cpp.i:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/src/ExampleSurface.cpp.i
.PHONY : src/ExampleSurface.cpp.i
src/ExampleSurface.s: src/ExampleSurface.cpp.s
.PHONY : src/ExampleSurface.s
# target to generate assembly for a file
src/ExampleSurface.cpp.s:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/src/ExampleSurface.cpp.s
.PHONY : src/ExampleSurface.cpp.s
src/ExternalSurface.o: src/ExternalSurface.cpp.o
.PHONY : src/ExternalSurface.o
# target to build an object file
src/ExternalSurface.cpp.o:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/src/ExternalSurface.cpp.o
.PHONY : src/ExternalSurface.cpp.o
src/ExternalSurface.i: src/ExternalSurface.cpp.i
.PHONY : src/ExternalSurface.i
# target to preprocess a source file
src/ExternalSurface.cpp.i:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/src/ExternalSurface.cpp.i
.PHONY : src/ExternalSurface.cpp.i
src/ExternalSurface.s: src/ExternalSurface.cpp.s
.PHONY : src/ExternalSurface.s
# target to generate assembly for a file
src/ExternalSurface.cpp.s:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/src/ExternalSurface.cpp.s
.PHONY : src/ExternalSurface.cpp.s
src/MeshSurface.o: src/MeshSurface.cpp.o
.PHONY : src/MeshSurface.o
# target to build an object file
src/MeshSurface.cpp.o:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/src/MeshSurface.cpp.o
.PHONY : src/MeshSurface.cpp.o
src/MeshSurface.i: src/MeshSurface.cpp.i
.PHONY : src/MeshSurface.i
# target to preprocess a source file
src/MeshSurface.cpp.i:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/src/MeshSurface.cpp.i
.PHONY : src/MeshSurface.cpp.i
src/MeshSurface.s: src/MeshSurface.cpp.s
.PHONY : src/MeshSurface.s
# target to generate assembly for a file
src/MeshSurface.cpp.s:
$(MAKE) -f CMakeFiles/NanoShaper.dir/build.make CMakeFiles/NanoShaper.dir/src/MeshSurface.cpp.s
.PHONY : src/MeshSurface.cpp.s