Compiling PCL in MSVS 2010 with SSE/CUDA support

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiling PCL in MSVS 2010 with SSE/CUDA support

Roland Aigner

Hi,

 

I am absolutely new to PCL, so these questions have potential to be stupid:

 

1)      I use CMake GUI to build my MSVS solution and project files, everything worked quite well. In the project properties in VS however, I noticed that in Code Generation, the option “Enable Enhanced Instruction Set” is set to “Not Set”. So how do I configure my projects to use SSE? I couldn’t find any related options in CMake, not even in the advanced set.

2)      How do I compile with CUDA support? I read on [1] that CUDA >= 4.0 is supported. I have CUDA 5.5 SDK installed, however in CMake I couldn’t see options for that either.

 

Thanks,

Roland


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Compiling PCL in MSVS 2010 with SSE/CUDA support

VictorLamoine
Administrator
2) To see GPU and CUDA options in cmake you have to check "advanced mode".
Check this tutorial : http://pointclouds.org/documentation/tutorials/gpu_install.php#gpu-install

It is quite the same on windows (ccmake and cmake for Windows are similar)
Reply | Threaded
Open this post in threaded view
|

Re: Compiling PCL in MSVS 2010 with SSE/CUDA support

Roland Aigner
Thanks for your reply. I did check "advanced mode", but there's nothing about CUDA or SSE.
PCL 1.7.1, btw.

-----Ursprüngliche Nachricht-----
Von: [hidden email] [mailto:[hidden email]] Im Auftrag von VictorL
Gesendet: Freitag, 24. Jänner 2014 09:19
An: [hidden email]
Betreff: Re: [PCL-users] Compiling PCL in MSVS 2010 with SSE/CUDA support

2) To see GPU and CUDA options in cmake you have to check "advanced mode".
Check this tutorial :
http://pointclouds.org/documentation/tutorials/gpu_install.php#gpu-install

It is quite the same on windows (ccmake and cmake for Windows are similar)



--
View this message in context: http://www.pcl-users.org/Compiling-PCL-in-MSVS-2010-with-SSE-CUDA-support-tp4031871p4031880.html
Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
_______________________________________________
[hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pcl-users
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Compiling PCL in MSVS 2010 with SSE/CUDA support

nizar sallem
If there is nothing about CUDA then probably cuda module is unchecked
for build.
Check it first and then rerun the configure step.

Cheers,
--
Nizar

On 24/01/2014 09:50, Roland Aigner wrote:

> Thanks for your reply. I did check "advanced mode", but there's nothing about CUDA or SSE.
> PCL 1.7.1, btw.
>
> -----Ursprüngliche Nachricht-----
> Von: [hidden email] [mailto:[hidden email]] Im Auftrag von VictorL
> Gesendet: Freitag, 24. Jänner 2014 09:19
> An: [hidden email]
> Betreff: Re: [PCL-users] Compiling PCL in MSVS 2010 with SSE/CUDA support
>
> 2) To see GPU and CUDA options in cmake you have to check "advanced mode".
> Check this tutorial :
> http://pointclouds.org/documentation/tutorials/gpu_install.php#gpu-install
>
> It is quite the same on windows (ccmake and cmake for Windows are similar)
>
>
>
> --
> View this message in context: http://www.pcl-users.org/Compiling-PCL-in-MSVS-2010-with-SSE-CUDA-support-tp4031871p4031880.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pcl-users
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
>
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Compiling PCL in MSVS 2010 with SSE/CUDA support

Roland Aigner
What am I supposed to check? That's what I'm saying: there is no single setting related to CUDA


-----Ursprüngliche Nachricht-----
Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Nizar Sallem
Gesendet: Freitag, 24. Jänner 2014 10:29
An: Point Cloud Library (PCL) users
Betreff: Re: [PCL-users] Compiling PCL in MSVS 2010 with SSE/CUDA support

If there is nothing about CUDA then probably cuda module is unchecked for build.
Check it first and then rerun the configure step.

Cheers,
--
Nizar

On 24/01/2014 09:50, Roland Aigner wrote:

> Thanks for your reply. I did check "advanced mode", but there's nothing about CUDA or SSE.
> PCL 1.7.1, btw.
>
> -----Ursprüngliche Nachricht-----
> Von: [hidden email]
> [mailto:[hidden email]] Im Auftrag von VictorL
> Gesendet: Freitag, 24. Jänner 2014 09:19
> An: [hidden email]
> Betreff: Re: [PCL-users] Compiling PCL in MSVS 2010 with SSE/CUDA
> support
>
> 2) To see GPU and CUDA options in cmake you have to check "advanced mode".
> Check this tutorial :
> http://pointclouds.org/documentation/tutorials/gpu_install.php#gpu-ins
> tall
>
> It is quite the same on windows (ccmake and cmake for Windows are
> similar)
>
>
>
> --
> View this message in context:
> http://www.pcl-users.org/Compiling-PCL-in-MSVS-2010-with-SSE-CUDA-supp
> ort-tp4031871p4031880.html Sent from the Point Cloud Library (PCL)
> Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org 
> http://pointclouds.org/mailman/listinfo/pcl-users
> _______________________________________________
> [hidden email] / http://pointclouds.org 
> http://pointclouds.org/mailman/listinfo/pcl-users
>
_______________________________________________
[hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pcl-users
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Compiling PCL in MSVS 2010 with SSE/CUDA support

nizar sallem
Hi Roland,

Could you please be more polite this is a user forum so we expect people
to behave when they ask for something.
It is the cuda module I am talking about and not the CUDA SDK, check for
BUILD_CUDA and BUILD_GPU while you are there.

--
Nizar

On 24/01/2014 11:10, Roland Aigner wrote:

> What am I supposed to check? That's what I'm saying: there is no single setting related to CUDA
>
>
> -----Ursprüngliche Nachricht-----
> Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Nizar Sallem
> Gesendet: Freitag, 24. Jänner 2014 10:29
> An: Point Cloud Library (PCL) users
> Betreff: Re: [PCL-users] Compiling PCL in MSVS 2010 with SSE/CUDA support
>
> If there is nothing about CUDA then probably cuda module is unchecked for build.
> Check it first and then rerun the configure step.
>
> Cheers,
> --
> Nizar
>
> On 24/01/2014 09:50, Roland Aigner wrote:
>> Thanks for your reply. I did check "advanced mode", but there's nothing about CUDA or SSE.
>> PCL 1.7.1, btw.
>>
>> -----Ursprüngliche Nachricht-----
>> Von: [hidden email]
>> [mailto:[hidden email]] Im Auftrag von VictorL
>> Gesendet: Freitag, 24. Jänner 2014 09:19
>> An: [hidden email]
>> Betreff: Re: [PCL-users] Compiling PCL in MSVS 2010 with SSE/CUDA
>> support
>>
>> 2) To see GPU and CUDA options in cmake you have to check "advanced mode".
>> Check this tutorial :
>> http://pointclouds.org/documentation/tutorials/gpu_install.php#gpu-ins
>> tall
>>
>> It is quite the same on windows (ccmake and cmake for Windows are
>> similar)
>>
>>
>>
>> --
>> View this message in context:
>> http://www.pcl-users.org/Compiling-PCL-in-MSVS-2010-with-SSE-CUDA-supp
>> ort-tp4031871p4031880.html Sent from the Point Cloud Library (PCL)
>> Users mailing list mailing list archive at Nabble.com.
>> _______________________________________________
>> [hidden email] / http://pointclouds.org
>> http://pointclouds.org/mailman/listinfo/pcl-users
>> _______________________________________________
>> [hidden email] / http://pointclouds.org
>> http://pointclouds.org/mailman/listinfo/pcl-users
>>
> _______________________________________________
> [hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pcl-users
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
>
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Compiling PCL in MSVS 2010 with SSE/CUDA support

Roland Aigner
Hi Nizar,

I'm sorry if I didn't behave. Frankly I am not sure what you're referring to, maybe you mean that I forgot of the "thanks" since I was in a hurry. Please keep in mind that English is not my mother's tongue, so phrases reading completely fine to me might be offensive to a native speaker. I'm sure it also depends on how you're making it sound in your head while you read. In my case imagine a rather frustrated tone, since I'm getting the impression that I'm doing something so completely wrong, nobody even can think of the source of my issue.

So regarding you reply: Thanks, but all I can do is repeat that there's no single setting saying something like "CUDA" or even "GPU" in my CMake GUI (advanced mode). I'm also not sure what you mean by "CUDA module". I have the CUDA SDK installed as it is stated as optional on the HP, that's it. I was expecting having to set include and library paths in CMake.

Thank you,
Roland
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Compiling PCL in MSVS 2010 with SSE/CUDA support

nizar sallem
Hi Roland,

PCL have modules each one can be enabled/disabled for the build process.
One of them being the cuda module.
It doesn't seem normal that you douldn't even find build_CUDA entry in
your cmake which is at the basic level. Did you run cmake to populate
the CMakeCache.txt ? If so can you copy/paste your CMakeCache.txt file
please ?

--
Nizar

On 24/01/2014 15:47, Roland Aigner wrote:

> Hi Nizar,
>
> I'm sorry if I didn't behave. Frankly I am not sure what you're referring to, maybe you mean that I forgot of the "thanks" since I was in a hurry. Please keep in mind that English is not my mother's tongue, so phrases reading completely fine to me might be offensive to a native speaker. I'm sure it also depends on how you're making it sound in your head while you read. In my case imagine a rather frustrated tone, since I'm getting the impression that I'm doing something so completely wrong, nobody even can think of the source of my issue.
>
> So regarding you reply: Thanks, but all I can do is repeat that there's no single setting saying something like "CUDA" or even "GPU" in my CMake GUI (advanced mode). I'm also not sure what you mean by "CUDA module". I have the CUDA SDK installed as it is stated as optional on the HP, that's it. I was expecting having to set include and library paths in CMake.
>
> Thank you,
> Roland
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
>
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Compiling PCL in MSVS 2010 with SSE/CUDA support

Roland Aigner
Hi Nizar,

okay, but it's not the case that there's an additional package I have to install so CUDA shows up, because that's what I started to believe...
Please find my CMakeLists.txt below. Nothing about CUDA/GPU there. I'm not exactly a CMake ninja, so I don't know where to start in spotting the problem.

Best,
Roland



### ---[ PCL global CMake
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "possible configurations" FORCE)

# In case the user does not setup CMAKE_BUILD_TYPE, assume it's RelWithDebInfo
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
  set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "build type default to RelWithDebInfo, set to Release to improve performance" FORCE)
endif("${CMAKE_BUILD_TYPE}" STREQUAL "")

project(PCL)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)

### ---[ Find universal dependencies
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules/" ${CMAKE_MODULE_PATH})

# ---[ Release/Debug specific flags
if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
  add_definitions("-DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG")
endif()
if(WIN32 AND NOT MINGW)
  if(NOT DEFINED CMAKE_DEBUG_POSTFIX)
    set(CMAKE_DEBUG_POSTFIX "_debug")
  endif()
  if(NOT DEFINED CMAKE_RELEASE_POSTFIX)
    set(CMAKE_RELEASE_POSTFIX "_release")
  endif()
endif()

# ---[ special maintainer mode
SET(CMAKE_CXX_FLAGS_MAINTAINER "-pedantic -Wno-variadic-macros -Weffc++ -Wno-long-long" CACHE STRING
    "Flags used by the C++ compiler during maintainer builds."
    FORCE)
SET(CMAKE_C_FLAGS_MAINTAINER "-pedantic -Wno-variadic-macros -Weffc++ -Wno-long-long" CACHE STRING
    "Flags used by the C compiler during maintainer builds."
    FORCE)
SET(CMAKE_EXE_LINKER_FLAGS_MAINTAINER
    "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
    "Flags used for linking binaries during maintainer builds."
    FORCE)
SET(CMAKE_SHARED_LINKER_FLAGS_MAINTAINER
    "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
    "Flags used by the shared libraries linker during maintainer builds."
    FORCE)
MARK_AS_ADVANCED(
    CMAKE_CXX_FLAGS_MAINTAINER
    CMAKE_C_FLAGS_MAINTAINER
    CMAKE_EXE_LINKER_FLAGS_MAINTAINER
    CMAKE_SHARED_LINKER_FLAGS_MAINTAINER )
# Update the documentation string of CMAKE_BUILD_TYPE for GUIs
SET(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
    "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel Maintainer."
    FORCE)

# ---[ Android check
if (ANDROID)
  set (PCL_SHARED_LIBS OFF)
  message ("PCL shared libs on Android must be: ${PCL_SHARED_LIBS}")
endif()

include(${PCL_SOURCE_DIR}/cmake/pcl_verbosity.cmake)
include(${PCL_SOURCE_DIR}/cmake/pcl_targets.cmake)
include(${PCL_SOURCE_DIR}/cmake/pcl_options.cmake)

# Enable verbose timing display?
if(CMAKE_TIMING_VERBOSE AND UNIX)
  set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
  set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CMAKE_SOURCE_DIR}/cmake/custom_output.sh")
endif(CMAKE_TIMING_VERBOSE AND UNIX)

# check for SSE flags
include(${PCL_SOURCE_DIR}/cmake/pcl_find_sse.cmake)
if (PCL_ENABLE_SSE)
  PCL_CHECK_FOR_SSE()
endif (PCL_ENABLE_SSE)

# ---[ Unix/Darwin/Windows specific flags
if(CMAKE_COMPILER_IS_GNUCXX)
  if("${CMAKE_CXX_FLAGS}" STREQUAL "")
    SET(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -fno-strict-aliasing -Wno-format-extra-args -Wno-sign-compare -Wno-invalid-offsetof -Wno-conversion ${SSE_FLAGS}")

    # Enable -Wabi for GCC > 4.3, and -Wno-deprecated for GCC < 4.3
    # to disable a lot of warnings which are not fixable
    execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
    if (GCC_VERSION VERSION_GREATER 4.3)
      message(STATUS "-- GCC > 4.3 found, enabling -Wabi")
      SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wabi")
    else()
      message(STATUS "-- GCC < 4.3 found, enabling -Wno-deprecated")
      SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
    endif ()
  endif()

  if(NOT ANDROID)
    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
  endif(NOT ANDROID)

  if(WIN32)
    if(PCL_SHARED_LIBS)
      SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all-symbols -Wl,--enable-auto-import")
      if (MINGW)
        add_definitions("-DBOOST_THREAD_USE_LIB")
      endif()
    else(PCL_SHARED_LIBS)
      add_definitions("-DBOOST_LIB_DIAGNOSTIC -DBOOST_THREAD_USE_LIB")
    endif(PCL_SHARED_LIBS)
  endif()
endif()

if(MSVC)
  SET(CMAKE_COMPILER_IS_MSVC 1)
  add_definitions ("-DBOOST_ALL_NO_LIB -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX /bigobj")
  if("${CMAKE_CXX_FLAGS}" STREQUAL " /DWIN32 /D_WINDOWS /W3 /GR /EHsc") # Check against default flags
    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj /EHsc /fp:precise /wd4800 /wd4521 /wd4251 /wd4275 /wd4305 /wd4355 ${SSE_FLAGS}")

    # Add extra code generation/link optimizations
    if(CMAKE_MSVC_CODE_LINK_OPTIMIZATION)
      SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL")
      SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG")
      SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG")
    endif(CMAKE_MSVC_CODE_LINK_OPTIMIZATION)
    # /MANIFEST:NO") # please, don't disable manifest generation, otherwise crash at start for vs2008

    if( MSVC_VERSION GREATER 1500 AND ${CMAKE_VERSION} VERSION_GREATER "2.8.6")
      include(ProcessorCount)
      ProcessorCount(N)
      if(NOT N EQUAL 0)
        SET(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   /MP${N} ")
        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP${N} ")
      endif()
    endif()
  endif()
endif()

if (__COMPILER_PATHSCALE)
  SET(CMAKE_COMPILER_IS_PATHSCALE 1)
  if("${CMAKE_CXX_FLAGS}" STREQUAL "")
    SET(CMAKE_CXX_FLAGS "-Wno-uninitialized -zerouv -pthread -mp")
  endif()
endif()

if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
  SET(CMAKE_COMPILER_IS_CLANG 1)
  if("${CMAKE_C_FLAGS}" STREQUAL "")
    SET(CMAKE_C_FLAGS "-Qunused-arguments")
  endif()
  if("${CMAKE_CXX_FLAGS}" STREQUAL "")
    SET(CMAKE_CXX_FLAGS "-Qunused-arguments -Wno-invalid-offsetof ${SSE_FLAGS}") # Unfortunately older Clang versions do not have this: -Wno-unnamed-type-template-args
  endif()
  SET(CLANG_LIBRARIES "stdc++")
endif()

# ---[ Project folders
option(USE_PROJECT_FOLDERS "Use folders to organize PCL projects in an IDE." OFF)
mark_as_advanced(USE_PROJECT_FOLDERS)
if(USE_PROJECT_FOLDERS)
  set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif(USE_PROJECT_FOLDERS)

include(${PCL_SOURCE_DIR}/cmake/pcl_utils.cmake)
set(PCL_VERSION 1.7.1 CACHE STRING "PCL version")
DISSECT_VERSION()
GET_OS_INFO()
SET_INSTALL_DIRS()

if(WIN32)
  set(PCL_RESOURCES_DIR ${PCL_SOURCE_DIR}/resources)
  set(PCL_POINTCLOUDS_DIR ${PCL_RESOURCES_DIR}/pointclouds)
endif(WIN32)

set(PCL_OUTPUT_LIB_DIR ${PCL_BINARY_DIR}/${LIB_INSTALL_DIR})
set(PCL_OUTPUT_BIN_DIR ${PCL_BINARY_DIR}/${BIN_INSTALL_DIR})
make_directory(${PCL_OUTPUT_LIB_DIR})
make_directory(${PCL_OUTPUT_BIN_DIR})
if(WIN32)
  foreach(config ${CMAKE_CONFIGURATION_TYPES})
    string(TOUPPER ${config} CONFIG)
    set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONFIG} "${PCL_OUTPUT_LIB_DIR}")
    set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONFIG} "${PCL_OUTPUT_BIN_DIR}")
    # ---[ Windows requires DLLs (shared libraries) to be installed in the same directory as executables
    set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONFIG} "${PCL_OUTPUT_BIN_DIR}")
  endforeach(config)
else(WIN32)
  set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PCL_OUTPUT_LIB_DIR}")
  set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PCL_OUTPUT_BIN_DIR}")
  set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PCL_OUTPUT_LIB_DIR}")
endif(WIN32)

# Add an "uninstall" target
configure_file("${PCL_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
               "${PCL_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
add_custom_target(uninstall "${CMAKE_COMMAND}" -P
                  "${PCL_BINARY_DIR}/uninstall_target.cmake")

###
# this is copy paste form http://www.itk.org/Wiki/CMake_RPATH_handling
# in order to always make a full statement RPATH
###
SET(CMAKE_SKIP_BUILD_RPATH  FALSE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}" is_system_dir)
IF("${is_system_dir}" STREQUAL "-1")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
ENDIF("${is_system_dir}" STREQUAL "-1")

### ---[ Find universal dependencies
# the gcc-4.2.1 coming with MacOS X is not compatible with the OpenMP pragmas we use, so disabling OpenMP for it
if((NOT APPLE) OR (NOT CMAKE_COMPILER_IS_GNUCXX) OR (GCC_VERSION VERSION_GREATER 4.2.1))
  find_package(OpenMP)
endif()
if(OPENMP_FOUND)
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
  message (STATUS "Found OpenMP")
  if(MSVC90 OR MSVC10)
    if(MSVC90)
      set(OPENMP_DLL VCOMP90)
    elseif(MSVC10)
      set(OPENMP_DLL VCOMP100)
    endif(MSVC90)
    set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DELAYLOAD:${OPENMP_DLL}D.dll")
    set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DELAYLOAD:${OPENMP_DLL}.dll")
  endif(MSVC90 OR MSVC10)
else(OPENMP_FOUND)
  message (STATUS "Not found OpenMP")
endif()
# Boost (required)
include(${PCL_SOURCE_DIR}/cmake/pcl_find_boost.cmake)
# Eigen (required)
find_package(Eigen REQUIRED)
include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS})
add_definitions(-DEIGEN_USE_NEW_STDVECTOR
                -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET)
# FLANN (required)
if(NOT PCL_SHARED_LIBS OR (WIN32 AND NOT MINGW))
  set(FLANN_USE_STATIC ON)
endif(NOT PCL_SHARED_LIBS OR (WIN32 AND NOT MINGW))
find_package(FLANN 1.7.0 REQUIRED)
include_directories(${FLANN_INCLUDE_DIRS})

# libusb-1.0
find_package(libusb-1.0)
if(LIBUSB_1_FOUND)
  include_directories(${LIBUSB_1_INCLUDE_DIR})
endif(LIBUSB_1_FOUND)

# OpenNI
find_package(OpenNI)
if (OPENNI_FOUND)
  set(HAVE_OPENNI ON)
  include_directories(SYSTEM ${OPENNI_INCLUDE_DIRS})
endif()

# Fotonic (FZ_API)
find_package(FZAPI)
if (FZAPI_FOUND)
  set(HAVE_FZAPI ON)
  include_directories(SYSTEM ${FZAPI_INCLUDE_DIR})
endif()

# Intel Perceptional Computing Interface (PXCAPI)
find_package(PXCAPI)
if (PXCAPI_FOUND)
  set(HAVE_PXCAPI ON)
  include_directories(SYSTEM ${PXCAPI_INCLUDE_DIRS})
endif()

# LibPNG
find_package(PNG)
if (PNG_FOUND)
  set (HAVE_PNG ON)
  include_directories(${PNG_INCLUDE_DIR})
endif(PNG_FOUND)

# Qhull
if(NOT PCL_SHARED_LIBS OR WIN32)
  set(QHULL_USE_STATIC ON)
endif(NOT PCL_SHARED_LIBS OR WIN32)
find_package(Qhull)

# Find Qt5
include(cmake/pcl_find_qt5.cmake)

# Find QT4
if(NOT QT5_FOUND)
    find_package(Qt4)
    if (QT4_FOUND)
      include(${QT_USE_FILE})
    endif (QT4_FOUND)
endif()

# Find VTK
find_package(VTK)
if(VTK_FOUND)
  if (PCL_SHARED_LIBS OR
      (NOT (PCL_SHARED_LIBS) AND NOT (VTK_BUILD_SHARED_LIBS)))
    set(VTK_FOUND TRUE)
    find_package (QVTK)
    message(STATUS "VTK found (include: ${VTK_INCLUDE_DIRS}, lib: ${VTK_LIBRARY_DIRS})")
    link_directories(${VTK_LIBRARY_DIRS})
    set(HAVE_VTK ON)
  else ()
    set(VTK_FOUND OFF)
    set(HAVE_VTK OFF)
    message ("Warning: You are to build PCL in STATIC but VTK is SHARED!")
    message ("Warning: VTK disabled!")
  endif ()
endif(VTK_FOUND)
# Find MPI
if (WITH_MPI) # this script searches for MPI 10 sec under windows, annoying especially if you do this often
  find_package(MPI)
  if(MPI_CXX_FOUND)
    include_directories(SYSTEM ${MPI_INCLUDE_PATH})
  endif(MPI_CXX_FOUND)
endif()
#Find Doxygen and html help compiler if any
find_package(Doxygen)
if(DOXYGEN_FOUND)
  find_package(HTMLHelp)
endif(DOXYGEN_FOUND)
#Find PCAP
find_package(Pcap)

### ---[ Create the config.h file
set(pcl_config_h_in "${CMAKE_CURRENT_SOURCE_DIR}/pcl_config.h.in")
set(pcl_config_h "${CMAKE_CURRENT_BINARY_DIR}/include/pcl/pcl_config.h")
configure_file(${pcl_config_h_in} ${pcl_config_h})
PCL_ADD_INCLUDES(common "" ${pcl_config_h})
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include)

### ---[ Set up for tests
enable_testing()

### ---[ Set up for examples
#include(${PCL_SOURCE_DIR}/cmake/pcl_examples.cmake)

### ---[ Add the libraries subdirectories
include(${PCL_SOURCE_DIR}/cmake/pcl_targets.cmake)

collect_subproject_directory_names(${PCL_SOURCE_DIR} "CMakeLists.txt" PCL_MODULES_NAMES PCL_MODULES_DIRS doc)
set(PCL_MODULES_NAMES_UNSORTED ${PCL_MODULES_NAMES})
topological_sort(PCL_MODULES_NAMES PCL_ _DEPENDS)
sort_relative(PCL_MODULES_NAMES_UNSORTED PCL_MODULES_NAMES PCL_MODULES_DIRS)
foreach(subdir ${PCL_MODULES_DIRS})
  add_subdirectory(${PCL_SOURCE_DIR}/${subdir})  
endforeach(subdir)

### ---[ Documentation
add_subdirectory(doc)

### ---[ Configure PCLConfig.cmake
include(${PCL_SOURCE_DIR}/cmake/pcl_pclconfig.cmake)

### ---[ Package creation
include(${PCL_SOURCE_DIR}/cmake/pcl_all_in_one_installer.cmake)
include(${PCL_SOURCE_DIR}/cmake/pcl_cpack.cmake)

if(CPACK_GENERATOR)
  message(STATUS "Found CPack generators: ${CPACK_GENERATOR}")
  PCL_MAKE_CPACK_INPUT()
  set(CPACK_PROJECT_CONFIG_FILE "${PCL_CPACK_CFG_FILE}")
  include(CPack)
endif(CPACK_GENERATOR)
### ---[ Make a pretty picture of the dependency graph
include(${PCL_SOURCE_DIR}/cmake/dep_graph.cmake)
MAKE_DEP_GRAPH()

### ---[ Finish up
PCL_WRITE_STATUS_REPORT()
PCL_RESET_MAPS()
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Compiling PCL in MSVS 2010 with SSE/CUDA support

nizar sallem
Hi Roland,

I am aware of those but our policy is not exactly that. If your system
is not compatible with some module they will show up but with the BUILD
option set to OFF so don't worry about that.
You can find the CMakeCache.txt file in the build folder of pcl. That is
the one which can be helpful.

Cheers,
--
Nizar

On 25/01/2014 15:49, Roland Aigner wrote:

> Hi Nizar,
>
> okay, but it's not the case that there's an additional package I have to install so CUDA shows up, because that's what I started to believe...
> Please find my CMakeLists.txt below. Nothing about CUDA/GPU there. I'm not exactly a CMake ninja, so I don't know where to start in spotting the problem.
>
> Best,
> Roland
>
>
>
> ### ---[ PCL global CMake
> cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
>
> set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "possible configurations" FORCE)
>
> # In case the user does not setup CMAKE_BUILD_TYPE, assume it's RelWithDebInfo
> if("${CMAKE_BUILD_TYPE}" STREQUAL "")
>    set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "build type default to RelWithDebInfo, set to Release to improve performance" FORCE)
> endif("${CMAKE_BUILD_TYPE}" STREQUAL "")
>
> project(PCL)
> string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
>
> ### ---[ Find universal dependencies
> set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules/" ${CMAKE_MODULE_PATH})
>
> # ---[ Release/Debug specific flags
> if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
>    add_definitions("-DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG")
> endif()
> if(WIN32 AND NOT MINGW)
>    if(NOT DEFINED CMAKE_DEBUG_POSTFIX)
>      set(CMAKE_DEBUG_POSTFIX "_debug")
>    endif()
>    if(NOT DEFINED CMAKE_RELEASE_POSTFIX)
>      set(CMAKE_RELEASE_POSTFIX "_release")
>    endif()
> endif()
>
> # ---[ special maintainer mode
> SET(CMAKE_CXX_FLAGS_MAINTAINER "-pedantic -Wno-variadic-macros -Weffc++ -Wno-long-long" CACHE STRING
>      "Flags used by the C++ compiler during maintainer builds."
>      FORCE)
> SET(CMAKE_C_FLAGS_MAINTAINER "-pedantic -Wno-variadic-macros -Weffc++ -Wno-long-long" CACHE STRING
>      "Flags used by the C compiler during maintainer builds."
>      FORCE)
> SET(CMAKE_EXE_LINKER_FLAGS_MAINTAINER
>      "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
>      "Flags used for linking binaries during maintainer builds."
>      FORCE)
> SET(CMAKE_SHARED_LINKER_FLAGS_MAINTAINER
>      "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
>      "Flags used by the shared libraries linker during maintainer builds."
>      FORCE)
> MARK_AS_ADVANCED(
>      CMAKE_CXX_FLAGS_MAINTAINER
>      CMAKE_C_FLAGS_MAINTAINER
>      CMAKE_EXE_LINKER_FLAGS_MAINTAINER
>      CMAKE_SHARED_LINKER_FLAGS_MAINTAINER )
> # Update the documentation string of CMAKE_BUILD_TYPE for GUIs
> SET(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
>      "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel Maintainer."
>      FORCE)
>
> # ---[ Android check
> if (ANDROID)
>    set (PCL_SHARED_LIBS OFF)
>    message ("PCL shared libs on Android must be: ${PCL_SHARED_LIBS}")
> endif()
>
> include(${PCL_SOURCE_DIR}/cmake/pcl_verbosity.cmake)
> include(${PCL_SOURCE_DIR}/cmake/pcl_targets.cmake)
> include(${PCL_SOURCE_DIR}/cmake/pcl_options.cmake)
>
> # Enable verbose timing display?
> if(CMAKE_TIMING_VERBOSE AND UNIX)
>    set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
>    set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CMAKE_SOURCE_DIR}/cmake/custom_output.sh")
> endif(CMAKE_TIMING_VERBOSE AND UNIX)
>
> # check for SSE flags
> include(${PCL_SOURCE_DIR}/cmake/pcl_find_sse.cmake)
> if (PCL_ENABLE_SSE)
>    PCL_CHECK_FOR_SSE()
> endif (PCL_ENABLE_SSE)
>
> # ---[ Unix/Darwin/Windows specific flags
> if(CMAKE_COMPILER_IS_GNUCXX)
>    if("${CMAKE_CXX_FLAGS}" STREQUAL "")
>      SET(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -fno-strict-aliasing -Wno-format-extra-args -Wno-sign-compare -Wno-invalid-offsetof -Wno-conversion ${SSE_FLAGS}")
>
>      # Enable -Wabi for GCC > 4.3, and -Wno-deprecated for GCC < 4.3
>      # to disable a lot of warnings which are not fixable
>      execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
>      if (GCC_VERSION VERSION_GREATER 4.3)
>        message(STATUS "-- GCC > 4.3 found, enabling -Wabi")
>        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wabi")
>      else()
>        message(STATUS "-- GCC < 4.3 found, enabling -Wno-deprecated")
>        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
>      endif ()
>    endif()
>
>    if(NOT ANDROID)
>      SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
>    endif(NOT ANDROID)
>
>    if(WIN32)
>      if(PCL_SHARED_LIBS)
>        SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all-symbols -Wl,--enable-auto-import")
>        if (MINGW)
>          add_definitions("-DBOOST_THREAD_USE_LIB")
>        endif()
>      else(PCL_SHARED_LIBS)
>        add_definitions("-DBOOST_LIB_DIAGNOSTIC -DBOOST_THREAD_USE_LIB")
>      endif(PCL_SHARED_LIBS)
>    endif()
> endif()
>
> if(MSVC)
>    SET(CMAKE_COMPILER_IS_MSVC 1)
>    add_definitions ("-DBOOST_ALL_NO_LIB -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX /bigobj")
>    if("${CMAKE_CXX_FLAGS}" STREQUAL " /DWIN32 /D_WINDOWS /W3 /GR /EHsc") # Check against default flags
>      SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj /EHsc /fp:precise /wd4800 /wd4521 /wd4251 /wd4275 /wd4305 /wd4355 ${SSE_FLAGS}")
>
>      # Add extra code generation/link optimizations
>      if(CMAKE_MSVC_CODE_LINK_OPTIMIZATION)
>        SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL")
>        SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG")
>        SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG")
>      endif(CMAKE_MSVC_CODE_LINK_OPTIMIZATION)
>      # /MANIFEST:NO") # please, don't disable manifest generation, otherwise crash at start for vs2008
>
>      if( MSVC_VERSION GREATER 1500 AND ${CMAKE_VERSION} VERSION_GREATER "2.8.6")
>        include(ProcessorCount)
>        ProcessorCount(N)
>        if(NOT N EQUAL 0)
>          SET(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   /MP${N} ")
>          SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP${N} ")
>        endif()
>      endif()
>    endif()
> endif()
>
> if (__COMPILER_PATHSCALE)
>    SET(CMAKE_COMPILER_IS_PATHSCALE 1)
>    if("${CMAKE_CXX_FLAGS}" STREQUAL "")
>      SET(CMAKE_CXX_FLAGS "-Wno-uninitialized -zerouv -pthread -mp")
>    endif()
> endif()
>
> if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
>    SET(CMAKE_COMPILER_IS_CLANG 1)
>    if("${CMAKE_C_FLAGS}" STREQUAL "")
>      SET(CMAKE_C_FLAGS "-Qunused-arguments")
>    endif()
>    if("${CMAKE_CXX_FLAGS}" STREQUAL "")
>      SET(CMAKE_CXX_FLAGS "-Qunused-arguments -Wno-invalid-offsetof ${SSE_FLAGS}") # Unfortunately older Clang versions do not have this: -Wno-unnamed-type-template-args
>    endif()
>    SET(CLANG_LIBRARIES "stdc++")
> endif()
>
> # ---[ Project folders
> option(USE_PROJECT_FOLDERS "Use folders to organize PCL projects in an IDE." OFF)
> mark_as_advanced(USE_PROJECT_FOLDERS)
> if(USE_PROJECT_FOLDERS)
>    set_property(GLOBAL PROPERTY USE_FOLDERS ON)
> endif(USE_PROJECT_FOLDERS)
>
> include(${PCL_SOURCE_DIR}/cmake/pcl_utils.cmake)
> set(PCL_VERSION 1.7.1 CACHE STRING "PCL version")
> DISSECT_VERSION()
> GET_OS_INFO()
> SET_INSTALL_DIRS()
>
> if(WIN32)
>    set(PCL_RESOURCES_DIR ${PCL_SOURCE_DIR}/resources)
>    set(PCL_POINTCLOUDS_DIR ${PCL_RESOURCES_DIR}/pointclouds)
> endif(WIN32)
>
> set(PCL_OUTPUT_LIB_DIR ${PCL_BINARY_DIR}/${LIB_INSTALL_DIR})
> set(PCL_OUTPUT_BIN_DIR ${PCL_BINARY_DIR}/${BIN_INSTALL_DIR})
> make_directory(${PCL_OUTPUT_LIB_DIR})
> make_directory(${PCL_OUTPUT_BIN_DIR})
> if(WIN32)
>    foreach(config ${CMAKE_CONFIGURATION_TYPES})
>      string(TOUPPER ${config} CONFIG)
>      set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONFIG} "${PCL_OUTPUT_LIB_DIR}")
>      set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONFIG} "${PCL_OUTPUT_BIN_DIR}")
>      # ---[ Windows requires DLLs (shared libraries) to be installed in the same directory as executables
>      set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONFIG} "${PCL_OUTPUT_BIN_DIR}")
>    endforeach(config)
> else(WIN32)
>    set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PCL_OUTPUT_LIB_DIR}")
>    set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PCL_OUTPUT_BIN_DIR}")
>    set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PCL_OUTPUT_LIB_DIR}")
> endif(WIN32)
>
> # Add an "uninstall" target
> configure_file("${PCL_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
>                 "${PCL_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
> add_custom_target(uninstall "${CMAKE_COMMAND}" -P
>                    "${PCL_BINARY_DIR}/uninstall_target.cmake")
>
> ###
> # this is copy paste form http://www.itk.org/Wiki/CMake_RPATH_handling
> # in order to always make a full statement RPATH
> ###
> SET(CMAKE_SKIP_BUILD_RPATH  FALSE)
> SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
> SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
> SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
> LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}" is_system_dir)
> IF("${is_system_dir}" STREQUAL "-1")
> SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
> ENDIF("${is_system_dir}" STREQUAL "-1")
>
> ### ---[ Find universal dependencies
> # the gcc-4.2.1 coming with MacOS X is not compatible with the OpenMP pragmas we use, so disabling OpenMP for it
> if((NOT APPLE) OR (NOT CMAKE_COMPILER_IS_GNUCXX) OR (GCC_VERSION VERSION_GREATER 4.2.1))
>    find_package(OpenMP)
> endif()
> if(OPENMP_FOUND)
>    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
>    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
>    message (STATUS "Found OpenMP")
>    if(MSVC90 OR MSVC10)
>      if(MSVC90)
>        set(OPENMP_DLL VCOMP90)
>      elseif(MSVC10)
>        set(OPENMP_DLL VCOMP100)
>      endif(MSVC90)
>      set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DELAYLOAD:${OPENMP_DLL}D.dll")
>      set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DELAYLOAD:${OPENMP_DLL}.dll")
>    endif(MSVC90 OR MSVC10)
> else(OPENMP_FOUND)
>    message (STATUS "Not found OpenMP")
> endif()
> # Boost (required)
> include(${PCL_SOURCE_DIR}/cmake/pcl_find_boost.cmake)
> # Eigen (required)
> find_package(Eigen REQUIRED)
> include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS})
> add_definitions(-DEIGEN_USE_NEW_STDVECTOR
>                  -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET)
> # FLANN (required)
> if(NOT PCL_SHARED_LIBS OR (WIN32 AND NOT MINGW))
>    set(FLANN_USE_STATIC ON)
> endif(NOT PCL_SHARED_LIBS OR (WIN32 AND NOT MINGW))
> find_package(FLANN 1.7.0 REQUIRED)
> include_directories(${FLANN_INCLUDE_DIRS})
>
> # libusb-1.0
> find_package(libusb-1.0)
> if(LIBUSB_1_FOUND)
>    include_directories(${LIBUSB_1_INCLUDE_DIR})
> endif(LIBUSB_1_FOUND)
>
> # OpenNI
> find_package(OpenNI)
> if (OPENNI_FOUND)
>    set(HAVE_OPENNI ON)
>    include_directories(SYSTEM ${OPENNI_INCLUDE_DIRS})
> endif()
>
> # Fotonic (FZ_API)
> find_package(FZAPI)
> if (FZAPI_FOUND)
>    set(HAVE_FZAPI ON)
>    include_directories(SYSTEM ${FZAPI_INCLUDE_DIR})
> endif()
>
> # Intel Perceptional Computing Interface (PXCAPI)
> find_package(PXCAPI)
> if (PXCAPI_FOUND)
>    set(HAVE_PXCAPI ON)
>    include_directories(SYSTEM ${PXCAPI_INCLUDE_DIRS})
> endif()
>
> # LibPNG
> find_package(PNG)
> if (PNG_FOUND)
>    set (HAVE_PNG ON)
>    include_directories(${PNG_INCLUDE_DIR})
> endif(PNG_FOUND)
>
> # Qhull
> if(NOT PCL_SHARED_LIBS OR WIN32)
>    set(QHULL_USE_STATIC ON)
> endif(NOT PCL_SHARED_LIBS OR WIN32)
> find_package(Qhull)
>
> # Find Qt5
> include(cmake/pcl_find_qt5.cmake)
>
> # Find QT4
> if(NOT QT5_FOUND)
>      find_package(Qt4)
>      if (QT4_FOUND)
>        include(${QT_USE_FILE})
>      endif (QT4_FOUND)
> endif()
>
> # Find VTK
> find_package(VTK)
> if(VTK_FOUND)
>    if (PCL_SHARED_LIBS OR
>        (NOT (PCL_SHARED_LIBS) AND NOT (VTK_BUILD_SHARED_LIBS)))
>      set(VTK_FOUND TRUE)
>      find_package (QVTK)
>      message(STATUS "VTK found (include: ${VTK_INCLUDE_DIRS}, lib: ${VTK_LIBRARY_DIRS})")
>      link_directories(${VTK_LIBRARY_DIRS})
>      set(HAVE_VTK ON)
>    else ()
>      set(VTK_FOUND OFF)
>      set(HAVE_VTK OFF)
>      message ("Warning: You are to build PCL in STATIC but VTK is SHARED!")
>      message ("Warning: VTK disabled!")
>    endif ()
> endif(VTK_FOUND)
> # Find MPI
> if (WITH_MPI) # this script searches for MPI 10 sec under windows, annoying especially if you do this often
>    find_package(MPI)
>    if(MPI_CXX_FOUND)
>      include_directories(SYSTEM ${MPI_INCLUDE_PATH})
>    endif(MPI_CXX_FOUND)
> endif()
> #Find Doxygen and html help compiler if any
> find_package(Doxygen)
> if(DOXYGEN_FOUND)
>    find_package(HTMLHelp)
> endif(DOXYGEN_FOUND)
> #Find PCAP
> find_package(Pcap)
>
> ### ---[ Create the config.h file
> set(pcl_config_h_in "${CMAKE_CURRENT_SOURCE_DIR}/pcl_config.h.in")
> set(pcl_config_h "${CMAKE_CURRENT_BINARY_DIR}/include/pcl/pcl_config.h")
> configure_file(${pcl_config_h_in} ${pcl_config_h})
> PCL_ADD_INCLUDES(common "" ${pcl_config_h})
> include_directories(${CMAKE_CURRENT_BINARY_DIR}/include)
>
> ### ---[ Set up for tests
> enable_testing()
>
> ### ---[ Set up for examples
> #include(${PCL_SOURCE_DIR}/cmake/pcl_examples.cmake)
>
> ### ---[ Add the libraries subdirectories
> include(${PCL_SOURCE_DIR}/cmake/pcl_targets.cmake)
>
> collect_subproject_directory_names(${PCL_SOURCE_DIR} "CMakeLists.txt" PCL_MODULES_NAMES PCL_MODULES_DIRS doc)
> set(PCL_MODULES_NAMES_UNSORTED ${PCL_MODULES_NAMES})
> topological_sort(PCL_MODULES_NAMES PCL_ _DEPENDS)
> sort_relative(PCL_MODULES_NAMES_UNSORTED PCL_MODULES_NAMES PCL_MODULES_DIRS)
> foreach(subdir ${PCL_MODULES_DIRS})
>    add_subdirectory(${PCL_SOURCE_DIR}/${subdir})
> endforeach(subdir)
>
> ### ---[ Documentation
> add_subdirectory(doc)
>
> ### ---[ Configure PCLConfig.cmake
> include(${PCL_SOURCE_DIR}/cmake/pcl_pclconfig.cmake)
>
> ### ---[ Package creation
> include(${PCL_SOURCE_DIR}/cmake/pcl_all_in_one_installer.cmake)
> include(${PCL_SOURCE_DIR}/cmake/pcl_cpack.cmake)
>
> if(CPACK_GENERATOR)
>    message(STATUS "Found CPack generators: ${CPACK_GENERATOR}")
>    PCL_MAKE_CPACK_INPUT()
>    set(CPACK_PROJECT_CONFIG_FILE "${PCL_CPACK_CFG_FILE}")
>    include(CPack)
> endif(CPACK_GENERATOR)
> ### ---[ Make a pretty picture of the dependency graph
> include(${PCL_SOURCE_DIR}/cmake/dep_graph.cmake)
> MAKE_DEP_GRAPH()
>
> ### ---[ Finish up
> PCL_WRITE_STATUS_REPORT()
> PCL_RESET_MAPS()
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
>
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Compiling PCL in MSVS 2010 with SSE/CUDA support

VictorLamoine
Administrator
This post was updated on .
Correct me if I'm wrong:

The GPU install tutorial (http://pointclouds.org/documentation/tutorials/gpu_install.php#gpu-install) states :
Now you can get the latest git master (or another one) of PCL and configure your installation to use the CUDA functions.
There's nothing GPU/CUDA related in the latest PCL release :https://github.com/PointCloudLibrary/pcl/releases/tag/pcl-1.7.1
GPU/CUDA features are only available in the trunk.
Reply | Threaded
Open this post in threaded view
|

Re: Compiling PCL in MSVS 2010 with SSE/CUDA support

Roland Aigner
Thanks Victor, that was it. I was following the instructions there at this page and thought I might have something completely wrong. The CUDA folder can indeed be found in the trunk.


-----Ursprüngliche Nachricht-----
Von: [hidden email] [mailto:[hidden email]] Im Auftrag von VictorL
Gesendet: Freitag, 31. Jänner 2014 10:21
An: [hidden email]
Betreff: Re: [PCL-users] Compiling PCL in MSVS 2010 with SSE/CUDA support

Correct me if I'm wrong:

The GPU install tutorial
(http://pointclouds.org/documentation/tutorials/gpu_install.php#gpu-install)
states :

> Now you can get the latest git master (or another one) of PCL and
> configure your installation to use the CUDA functions.

There's nothing GPU/CUDA related in the latest git master
:https://github.com/PointCloudLibrary/pcl/releases/tag/pcl-1.7.1
GPU/CUDA features are only available in the trunk.



--
View this message in context: http://www.pcl-users.org/Compiling-PCL-in-MSVS-2010-with-SSE-CUDA-support-tp4031871p4032029.html
Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
_______________________________________________
[hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pcl-users
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users