Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,24 @@ else()
endif()
set(RANDOMLIB_INCPATH "${RANDOMLIB_DESTPATH}/include")


externalproject_add(
randomlibBuild
GIT_REPOSITORY http://git.code.sf.net/p/randomlib/code
GIT_TAG "r1.6"
CMAKE_ARGS "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}"
set(RANDOMLIB_CMAKE_ARGS "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}"
"-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
"-DCMAKE_INSTALL_PREFIX=${RANDOMLIB_DESTPATH}"
"-DCMAKE_BUILD_TYPE=RELEASE"
"-DMAINTAINER=OFF"
"-DRANDOM_SHARED_LIB=OFF"
"-DCMAKE_C_FLAGS=-fpic"
"-DCMAKE_CXX_FLAGS=-fpic"
"-DDISABLE_BOOST=ON"
"-DRANDOMLIB_DOCUMENTATION=OFF"
"-DRANDOMLIB_DOCUMENTATION=OFF")

if(NOT MSVC)
set(RANDOMLIB_CMAKE_ARGS ${RANDOMLIB_CMAKE_ARGS} "-DCMAKE_C_FLAGS=-fpic" "-DCMAKE_CXX_FLAGS=-fpic")
endif()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be better to just change this to set CMAKE_POSITION_INDEPENDENT_CODE instead.


externalproject_add(
randomlibBuild
GIT_REPOSITORY http://git.code.sf.net/p/randomlib/code
GIT_TAG "r1.6"
CMAKE_ARGS ${RANDOMLIB_CMAKE_ARGS}
UPDATE_COMMAND "" )

add_library(randomlib STATIC IMPORTED DEPENDS)
Expand Down Expand Up @@ -75,7 +78,7 @@ add_definitions(-DVCL_CAN_STATIC_CONST_INIT_FLOAT=0 -DVCL_CAN_STATIC_CONST_INIT_
if(MSVC)
# NOTE: The slic library uses a preprocessor flag "WINDOWS". Do NOT set
# this flag for Visual Studio because it breaks everything
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -DNOMINMAX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OPENMP_FLAG}")
else()
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++11 -O3 ${OPENMP_FLAG}")
Expand Down
3 changes: 2 additions & 1 deletion IntegralImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#define INTEGRALIMAGE_H

#include <Matrix3D.h>
#include <cmath>
#include <vector>

// a box of center (x,y,z), radius (rx,ry,rz)
Expand Down Expand Up @@ -73,7 +74,7 @@ class IntegralImage
template<typename S>
static inline S removeNaN( S val )
{
if ( std::isnan(val) || std::isinf(val) )
if ( std::isnan((double)val) || std::isinf((double)val) )
return (S)0;
else
return val;
Expand Down
1 change: 1 addition & 0 deletions ROIData.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#ifndef _ROI_DATA_H_
#define _ROI_DATA_H_

#include <cmath>
#include <Eigen/Dense>
#include <vector>

Expand Down
2 changes: 1 addition & 1 deletion auxItk/AllEigenVectorsOfHessian.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ namespace AllEigenVectorsOfHessian

using namespace std;

#if defined(_MSC_VER) && _MSC_VER <= 1700
#if defined(_MSC_VER)
#define showMsg(args) \
do { \
printf("\x1b[32m" "\x1b[1m["); \
Expand Down
2 changes: 2 additions & 0 deletions slic/LKM.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Email: firstname.lastname@epfl.ch
//////////////////////////////////////////////////////////////////////

#include <algorithm>

#if !defined(_LKM_H_INCLUDED_)
#define _LKM_H_INCLUDED_

Expand Down