Skip to content

Commit

Permalink
Fixed autogen cmake warnings. Fixed pytorch requiring c++17.
Browse files Browse the repository at this point in the history
  • Loading branch information
matlabbe committed Sep 16, 2023
1 parent 39dedba commit 97f2b4b
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 16 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ IF(WITH_ORB_SLAM AND NOT G2O_FOUND)
ENDIF(WITH_ORB_SLAM AND NOT G2O_FOUND)

IF(NOT MSVC)
IF(Qt6_FOUND OR (G2O_FOUND AND G2O_CPP11 EQUAL 1))
IF(Qt6_FOUND OR (G2O_FOUND AND G2O_CPP11 EQUAL 1) OR TORCH_FOUND)
# Qt6 requires c++17
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++17" COMPILER_SUPPORTS_CXX17)
Expand All @@ -787,7 +787,7 @@ IF(NOT MSVC)
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++17 support. Please use a different C++ compiler if you want to use Qt6.")
ENDIF()
ENDIF()
IF((NOT (${CMAKE_CXX_STANDARD} STREQUAL "17")) AND (msckf_vio_FOUND OR loam_velodyne_FOUND OR floam_FOUND OR PCL_VERSION VERSION_GREATER "1.9.1" OR TORCH_FOUND OR G2O_FOUND OR CCCoreLib_FOUND OR Open3D_FOUND))
IF((NOT (${CMAKE_CXX_STANDARD} STREQUAL "17")) AND (msckf_vio_FOUND OR loam_velodyne_FOUND OR floam_FOUND OR PCL_VERSION VERSION_GREATER "1.9.1" OR G2O_FOUND OR CCCoreLib_FOUND OR Open3D_FOUND))
#MSCKF_VIO, LOAM, PCL>=1.10, latest g2o and CCCoreLib require c++14
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
Expand Down
1 change: 1 addition & 0 deletions corelib/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,7 @@ foreach(arg ${RESOURCES})
get_filename_component(filename ${arg} NAME)
string(REPLACE "." "_" output ${filename})
set(RESOURCES_HEADERS "${RESOURCES_HEADERS}" "${CMAKE_CURRENT_BINARY_DIR}/${output}.h")
set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/${output}.h" PROPERTY SKIP_AUTOGEN ON)
endforeach(arg ${RESOURCES})

#MESSAGE(STATUS "RESOURCES = ${RESOURCES}")
Expand Down
4 changes: 2 additions & 2 deletions corelib/src/optimizer/OptimizerTORO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <rtabmap/core/optimizer/OptimizerTORO.h>

#ifdef RTABMAP_TORO
#include "toro3d/treeoptimizer3.hh"
#include "toro3d/treeoptimizer2.hh"
#include "toro3d/treeoptimizer3.h"
#include "toro3d/treeoptimizer2.h"
#endif

namespace rtabmap {
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion corelib/src/optimizer/toro3d/posegraph2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
* such as loading, saving, merging constraints, and etc.
**/

#include "posegraph2.hh"
#include "posegraph2.h"

#include <fstream>
#include <sstream>
#include <string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
#ifndef _POSEGRAPH2_HH_
#define _POSEGRAPH2_HH_

#include "posegraph.hh"
#include "transformation2.hh"
#include <iostream>
#include <vector>
#include "posegraph.h"
#include "transformation2.h"

namespace AISNavigation {

Expand Down
3 changes: 2 additions & 1 deletion corelib/src/optimizer/toro3d/posegraph3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
* such as loading, saving, merging constraints, and etc.
**/

#include "posegraph3.hh"
#include "posegraph3.h"

#include <fstream>
#include <sstream>
#include <string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
#ifndef _POSEGRAPH3_HH_
#define _POSEGRAPH3_HH_

#include "posegraph.hh"
#include "transformation3.hh"
#include <iostream>
#include <vector>
#include "posegraph.h"
#include "transformation3.h"

typedef unsigned int uint;
#ifndef M_PI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@

#include <assert.h>
#include <cmath>
#include "dmatrix.hh"

#include "dmatrix.h"

namespace AISNavigation {

Expand Down
3 changes: 2 additions & 1 deletion corelib/src/optimizer/toro3d/treeoptimizer2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
*
**/

#include "treeoptimizer2.hh"
#include "treeoptimizer2.h"

#include <fstream>
#include <sstream>
#include <string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#ifndef _TREEOPTIMIZER2_HH_
#define _TREEOPTIMIZER2_HH_

#include "posegraph2.hh"
#include "posegraph2.h"

namespace AISNavigation {

Expand Down
3 changes: 2 additions & 1 deletion corelib/src/optimizer/toro3d/treeoptimizer3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
*
**/

#include "treeoptimizer3.hh"
#include "treeoptimizer3.h"

#include <fstream>
#include <sstream>
#include <string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#ifndef _TREEOPTIMIZER3_HH_
#define _TREEOPTIMIZER3_HH_

#include "posegraph3.hh"
#include "posegraph3.h"

namespace AISNavigation {

Expand Down
2 changes: 1 addition & 1 deletion corelib/src/optimizer/toro3d/treeoptimizer3_iteration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
* PURPOSE.
**********************************************************************/

#include "treeoptimizer3.hh"
#include <fstream>
#include <string>
#include "treeoptimizer3.h"

using namespace std;

Expand Down

0 comments on commit 97f2b4b

Please sign in to comment.