Skip to content

Commit

Permalink
Merge pull request #536 from boxanm/c++17_support
Browse files Browse the repository at this point in the history
@boxanm I'm bypassing the branch protection rule since all test has passed and @simonpierredeschenes approved the the change as a code owner.  The missing check was due to a miss-configuration in the `CODEOWNERS` file that required an approval by @pomerlef  on all changes to the codebase. I'll push a fix so that he receive request for selected files that require admin oversight and keep the rest of the codebase under the responsibility of the maintainer group
  • Loading branch information
RedLeader962 committed Dec 20, 2023
2 parents 6ae246e + 9b7d69d commit cda14bc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -235,21 +235,21 @@ check_symbol_exists(_POSIX_TIMERS "unistd.h;time.h" POSIX_TIMERS)

#========================== libpointmatcher itself ==============================

# Check the compiler version as we need full C++11 support.
# Check the compiler version as we need full C++17 support.
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# using Clang
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.3")
message(WARNING, "Your clang compiler has version ${CMAKE_CXX_COMPILER_VERSION}, while only version 3.3 or later is supported")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5")
message(WARNING, "Your clang compiler has version ${CMAKE_CXX_COMPILER_VERSION}, while only version 5 or later is supported")
endif ()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
# using AppleClang
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.1")
message(WARNING "Your XCode environment has version ${CMAKE_CXX_COMPILER_VERSION}, while only version 5.1 or later is supported")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.0")
message(WARNING "Your XCode environment has version ${CMAKE_CXX_COMPILER_VERSION}, while only version 7.0 or later is supported")
endif()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# using GCC
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8.2")
message(WARNING, "Your g++ compiler has version ${CMAKE_CXX_COMPILER_VERSION}, while only version 4.8.2 or later is supported")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9")
message(WARNING, "Your g++ compiler has version ${CMAKE_CXX_COMPILER_VERSION}, while only version 9 or later is supported")
endif ()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# using MSVC
Expand All @@ -258,18 +258,18 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
endif()
endif ()

# enable C++11 support.
if (CMAKE_VERSION VERSION_LESS "3.1")
# enable C++17 support.
if (CMAKE_VERSION VERSION_LESS "3.8")
if (MSVC)
message(FATAL_ERROR, "CMake version 3.1 or later is required to compiler ${PROJECT_NAME} with Microsoft Visual C++")
endif ()
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
else ()
set (CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "-std=c++17 ${CMAKE_CXX_FLAGS}")
endif ()
else ()
set (CMAKE_CXX_STANDARD 11)
set (CMAKE_CXX_STANDARD 17)
endif ()

# SOURCE
Expand Down
2 changes: 1 addition & 1 deletion pointmatcher/DataPointsFilters/NormalSpace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void NormalSpaceDataPointsFilter<T>::inPlaceFilter(DataPoints& cloud)
// Generate a random sequence of indices so that elements are placed in buckets in random order
std::vector<std::size_t> randIdcs(nbPoints);
std::iota(randIdcs.begin(), randIdcs.end(), 0);
std::random_shuffle(randIdcs.begin(), randIdcs.end());
std::shuffle(randIdcs.begin(), randIdcs.end(), gen);

///(1) put all points of the data into buckets based on their normal direction
for (auto randIdx : randIdcs)
Expand Down

0 comments on commit cda14bc

Please sign in to comment.