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
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ if(CMAKE_COMPILER_IS_MSVC)
string(APPEND CMAKE_C_FLAGS " /FS")
string(APPEND CMAKE_CXX_FLAGS " /FS")
endif()

if(MSVC_VERSION GREATER_EQUAL 1914)
string(APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus")
endif()
endif()

if(CMAKE_COMPILER_IS_PATHSCALE)
Expand Down
3 changes: 1 addition & 2 deletions PCLConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,8 @@ set(PCL_SHARED_LIBS "@PCL_SHARED_LIBS@")
#set SSE flags used compiling PCL
list(APPEND PCL_DEFINITIONS @PCLCONFIG_SSE_DEFINITIONS@)
list(APPEND PCL_COMPILE_OPTIONS @PCLCONFIG_SSE_COMPILE_OPTIONS@)

#set AVX flags used compiling PCL
list(APPEND PCL_COMPILE_OPTIONS @PCLCONFIG_AVX_COMPILE_OPTIONS@)
list(APPEND PCL_COMPILE_OPTIONS @PCLCONFIG_COMPILE_OPTIONS@)

set(pcl_all_components @PCLCONFIG_AVAILABLE_COMPONENTS@)
# insert "io_ply" before "io"
Expand Down
5 changes: 5 additions & 0 deletions cmake/pcl_pclconfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ set(PCLCONFIG_OPTIONAL_DEPENDENCIES)
set(PCLCONFIG_SSE_DEFINITIONS "${SSE_DEFINITIONS}")
set(PCLCONFIG_SSE_COMPILE_OPTIONS ${SSE_FLAGS})
set(PCLCONFIG_AVX_COMPILE_OPTIONS ${AVX_FLAGS})
set(PCLCONFIG_COMPILE_OPTIONS)

if(MSVC AND MSVC_VERSION GREATER_EQUAL 1914)
list(APPEND PCLCONFIG_COMPILE_OPTIONS "/Zc:__cplusplus")
endif()

# Eigen has a custom mechanism to guarantee aligned memory (used for everything older than C++17, see Memory.h in the Eigen project)
# If PCL is compiled with C++14 and the user project is compiled with C++17, this will lead to problems (e.g. memory allocated with the custom mechanism but freed without it)
Expand Down
Loading