From ba522a8859c2e15185427e5d0fb1d44b9ab1cbf3 Mon Sep 17 00:00:00 2001 From: Jai Moraes Date: Wed, 27 Nov 2024 13:17:37 -0500 Subject: [PATCH] GitLab version (branch QNX_7.1_v4.1.1) --- cmake/GtsamBuildTypes.cmake | 2 +- cmake/HandlePrintConfiguration.cmake | 2 +- gtsam/3rdparty/ceres/CMakeLists.txt | 6 +++++- gtsam/3rdparty/metis/include/CMakeLists.txt | 6 +++++- gtsam/base/CMakeLists.txt | 18 +++++++++++++++--- gtsam/basis/CMakeLists.txt | 6 +++++- gtsam/discrete/CMakeLists.txt | 6 +++++- gtsam/geometry/CMakeLists.txt | 6 +++++- gtsam/inference/CMakeLists.txt | 6 +++++- gtsam/linear/CMakeLists.txt | 6 +++++- gtsam/navigation/CMakeLists.txt | 6 +++++- gtsam/nonlinear/CMakeLists.txt | 13 ++++++++++--- gtsam/sam/CMakeLists.txt | 6 +++++- gtsam/sfm/CMakeLists.txt | 6 +++++- gtsam/slam/CMakeLists.txt | 6 +++++- gtsam/symbolic/CMakeLists.txt | 6 +++++- gtsam_unstable/base/CMakeLists.txt | 6 +++++- gtsam_unstable/discrete/CMakeLists.txt | 6 +++++- gtsam_unstable/dynamics/CMakeLists.txt | 6 +++++- gtsam_unstable/geometry/CMakeLists.txt | 6 +++++- gtsam_unstable/linear/CMakeLists.txt | 6 +++++- gtsam_unstable/nonlinear/CMakeLists.txt | 6 +++++- gtsam_unstable/partition/CMakeLists.txt | 6 +++++- gtsam_unstable/slam/CMakeLists.txt | 6 +++++- 24 files changed, 127 insertions(+), 28 deletions(-) diff --git a/cmake/GtsamBuildTypes.cmake b/cmake/GtsamBuildTypes.cmake index 4b179d128..72857e861 100644 --- a/cmake/GtsamBuildTypes.cmake +++ b/cmake/GtsamBuildTypes.cmake @@ -185,7 +185,7 @@ if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") endif() endif() -if (NOT MSVC) +if ((NOT MSVC) AND (NOT QNX)) option(GTSAM_BUILD_WITH_MARCH_NATIVE "Enable/Disable building with all instructions supported by native architecture (binary may not be portable!)" ON) if(GTSAM_BUILD_WITH_MARCH_NATIVE) # Add as public flag so all dependant projects also use it, as required diff --git a/cmake/HandlePrintConfiguration.cmake b/cmake/HandlePrintConfiguration.cmake index ad6ac5c5c..bfc476323 100644 --- a/cmake/HandlePrintConfiguration.cmake +++ b/cmake/HandlePrintConfiguration.cmake @@ -22,7 +22,7 @@ if(GTSAM_UNSTABLE_AVAILABLE) print_enabled_config(${GTSAM_UNSTABLE_INSTALL_MATLAB_TOOLBOX} "Build MATLAB Toolbox for unstable") endif() -if(NOT MSVC AND NOT XCODE_VERSION) +if(NOT MSVC AND NOT XCODE_VERSION AND NOT QNX) print_enabled_config(${GTSAM_BUILD_WITH_MARCH_NATIVE} "Build for native architecture ") print_config("Build type" "${CMAKE_BUILD_TYPE}") print_config("C compilation flags" "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_UPPER}}") diff --git a/gtsam/3rdparty/ceres/CMakeLists.txt b/gtsam/3rdparty/ceres/CMakeLists.txt index 98b2cffce..3a6031f17 100644 --- a/gtsam/3rdparty/ceres/CMakeLists.txt +++ b/gtsam/3rdparty/ceres/CMakeLists.txt @@ -1,2 +1,6 @@ file(GLOB ceres_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -install(FILES ${ceres_headers} DESTINATION include/gtsam/3rdparty/ceres) \ No newline at end of file +if(QNX) + install(FILES ${ceres_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/3rdparty/ceres) +else() + install(FILES ${ceres_headers} DESTINATION include/gtsam/3rdparty/ceres) +endif() \ No newline at end of file diff --git a/gtsam/3rdparty/metis/include/CMakeLists.txt b/gtsam/3rdparty/metis/include/CMakeLists.txt index 73754eebf..b87596f97 100644 --- a/gtsam/3rdparty/metis/include/CMakeLists.txt +++ b/gtsam/3rdparty/metis/include/CMakeLists.txt @@ -1 +1,5 @@ -install(FILES metis.h DESTINATION include/gtsam/3rdparty/metis) \ No newline at end of file +if(QNX) + install(FILES metis.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/3rdparty/metis) +else() + install(FILES metis.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/3rdparty/metis) +endif() \ No newline at end of file diff --git a/gtsam/base/CMakeLists.txt b/gtsam/base/CMakeLists.txt index 99984e7b3..b876c7293 100644 --- a/gtsam/base/CMakeLists.txt +++ b/gtsam/base/CMakeLists.txt @@ -1,12 +1,24 @@ # Install headers file(GLOB base_headers "*.h") -install(FILES ${base_headers} DESTINATION include/gtsam/base) +if(QNX) + install(FILES ${base_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/base) +else() + install(FILES ${base_headers} DESTINATION include/gtsam/base) +endif() file(GLOB base_headers_tree "treeTraversal/*.h") -install(FILES ${base_headers_tree} DESTINATION include/gtsam/base/treeTraversal) +if(QNX) + install(FILES ${base_headers_tree} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/base/treeTraversal) +else() + install(FILES ${base_headers_tree} DESTINATION include/gtsam/base/treeTraversal) +endif() file(GLOB deprecated_headers "deprecated/*.h") -install(FILES ${deprecated_headers} DESTINATION include/gtsam/base/deprecated) +if(QNX) + install(FILES ${deprecated_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/base/deprecated) +else() + install(FILES ${deprecated_headers} DESTINATION include/gtsam/base/deprecated) +endif() # Build tests add_subdirectory(tests) diff --git a/gtsam/basis/CMakeLists.txt b/gtsam/basis/CMakeLists.txt index 203fd96a2..e429adce4 100644 --- a/gtsam/basis/CMakeLists.txt +++ b/gtsam/basis/CMakeLists.txt @@ -1,6 +1,10 @@ # Install headers file(GLOB basis_headers "*.h") -install(FILES ${basis_headers} DESTINATION include/gtsam/basis) +if(QNX) + install(FILES ${basis_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/basis) +else() + install(FILES ${basis_headers} DESTINATION include/gtsam/basis) +endif() # Build tests add_subdirectory(tests) diff --git a/gtsam/discrete/CMakeLists.txt b/gtsam/discrete/CMakeLists.txt index d78dff34f..a4b5cc681 100644 --- a/gtsam/discrete/CMakeLists.txt +++ b/gtsam/discrete/CMakeLists.txt @@ -2,7 +2,11 @@ set(subdir discrete) file(GLOB discrete_headers "*.h") # FIXME: exclude headers -install(FILES ${discrete_headers} DESTINATION include/gtsam/discrete) +if(QNX) + install(FILES ${discrete_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/discrete) +else() + install(FILES ${discrete_headers} DESTINATION include/gtsam/discrete) +endif() # Add all tests add_subdirectory(tests) diff --git a/gtsam/geometry/CMakeLists.txt b/gtsam/geometry/CMakeLists.txt index dabdde45c..fb96d23de 100644 --- a/gtsam/geometry/CMakeLists.txt +++ b/gtsam/geometry/CMakeLists.txt @@ -1,6 +1,10 @@ # Install headers file(GLOB geometry_headers "*.h") -install(FILES ${geometry_headers} DESTINATION include/gtsam/geometry) +if(QNX) + install(FILES ${geometry_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/geometry) +else() + install(FILES ${geometry_headers} DESTINATION include/gtsam/geometry) +endif() # Build tests add_subdirectory(tests) diff --git a/gtsam/inference/CMakeLists.txt b/gtsam/inference/CMakeLists.txt index c3df3a989..2344221bc 100644 --- a/gtsam/inference/CMakeLists.txt +++ b/gtsam/inference/CMakeLists.txt @@ -1,6 +1,10 @@ # Install headers file(GLOB inference_headers "*.h") -install(FILES ${inference_headers} DESTINATION include/gtsam/inference) +if(QNX) + install(FILES ${inference_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/inference) +else() + install(FILES ${inference_headers} DESTINATION include/gtsam/inference) +endif() # Build tests add_subdirectory(tests) diff --git a/gtsam/linear/CMakeLists.txt b/gtsam/linear/CMakeLists.txt index 084c27057..e3947851c 100644 --- a/gtsam/linear/CMakeLists.txt +++ b/gtsam/linear/CMakeLists.txt @@ -1,6 +1,10 @@ # Install headers file(GLOB linear_headers "*.h") -install(FILES ${linear_headers} DESTINATION include/gtsam/linear) +if(QNX) + install(FILES ${linear_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/linear) +else() + install(FILES ${linear_headers} DESTINATION include/gtsam/linear) +endif() # Build tests add_subdirectory(tests) diff --git a/gtsam/navigation/CMakeLists.txt b/gtsam/navigation/CMakeLists.txt index e2b2fdce6..c266b353a 100644 --- a/gtsam/navigation/CMakeLists.txt +++ b/gtsam/navigation/CMakeLists.txt @@ -1,6 +1,10 @@ # Install headers file(GLOB navigation_headers "*.h") -install(FILES ${navigation_headers} DESTINATION include/gtsam/navigation) +if(QNX) + install(FILES ${navigation_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/navigation) +else() + install(FILES ${navigation_headers} DESTINATION include/gtsam/navigation) +endif() # Add all tests add_subdirectory(tests) diff --git a/gtsam/nonlinear/CMakeLists.txt b/gtsam/nonlinear/CMakeLists.txt index ad4824817..98facc59e 100644 --- a/gtsam/nonlinear/CMakeLists.txt +++ b/gtsam/nonlinear/CMakeLists.txt @@ -1,9 +1,16 @@ # Install headers file(GLOB nonlinear_headers "*.h") -install(FILES ${nonlinear_headers} DESTINATION include/gtsam/nonlinear) +if(QNX) + install(FILES ${nonlinear_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/nonlinear) +else() + install(FILES ${nonlinear_headers} DESTINATION include/gtsam/nonlinear) +endif() file(GLOB nonlinear_headers_internal "internal/*.h") -install(FILES ${nonlinear_headers_internal} DESTINATION include/gtsam/nonlinear/internal) - +if(QNX) + install(FILES ${nonlinear_headers_internal} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/nonlinear/internal) +else() + install(FILES ${nonlinear_headers_internal} DESTINATION include/gtsam/nonlinear/internal) +endif() # Build tests add_subdirectory(tests) diff --git a/gtsam/sam/CMakeLists.txt b/gtsam/sam/CMakeLists.txt index bf20b751c..0ba13f837 100644 --- a/gtsam/sam/CMakeLists.txt +++ b/gtsam/sam/CMakeLists.txt @@ -1,6 +1,10 @@ # Install headers file(GLOB sam_headers "*.h") -install(FILES ${sam_headers} DESTINATION include/gtsam/sam) +if(QNX) + install(FILES ${sam_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/sam) +else() + install(FILES ${sam_headers} DESTINATION include/gtsam/sam) +endif() # Build tests add_subdirectory(tests) diff --git a/gtsam/sfm/CMakeLists.txt b/gtsam/sfm/CMakeLists.txt index fde997840..c3286d81a 100644 --- a/gtsam/sfm/CMakeLists.txt +++ b/gtsam/sfm/CMakeLists.txt @@ -1,6 +1,10 @@ # Install headers file(GLOB sfm_headers "*.h") -install(FILES ${sfm_headers} DESTINATION include/gtsam/sfm) +if(QNX) + install(FILES ${sfm_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/sfm) +else() + install(FILES ${sfm_headers} DESTINATION include/gtsam/sfm) +endif() # Build tests add_subdirectory(tests) diff --git a/gtsam/slam/CMakeLists.txt b/gtsam/slam/CMakeLists.txt index 22645973d..b35293912 100644 --- a/gtsam/slam/CMakeLists.txt +++ b/gtsam/slam/CMakeLists.txt @@ -4,7 +4,11 @@ set (slam_excluded_headers #"") ) file(GLOB slam_headers "*.h") -install(FILES ${slam_headers} DESTINATION include/gtsam/slam) +if(QNX) + install(FILES ${slam_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/slam) +else() + install(FILES ${slam_headers} DESTINATION include/gtsam/slam) +endif() # Build tests add_subdirectory(tests) diff --git a/gtsam/symbolic/CMakeLists.txt b/gtsam/symbolic/CMakeLists.txt index feb073f69..2c25a0970 100644 --- a/gtsam/symbolic/CMakeLists.txt +++ b/gtsam/symbolic/CMakeLists.txt @@ -1,6 +1,10 @@ # Install headers file(GLOB symbolic_headers "*.h") -install(FILES ${symbolic_headers} DESTINATION include/gtsam/symbolic) +if(QNX) + install(FILES ${symbolic_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/symbolic) +else() + install(FILES ${symbolic_headers} DESTINATION include/gtsam/symbolic) +endif() # Build tests add_subdirectory(tests) diff --git a/gtsam_unstable/base/CMakeLists.txt b/gtsam_unstable/base/CMakeLists.txt index 2cb96be36..b638302d8 100644 --- a/gtsam_unstable/base/CMakeLists.txt +++ b/gtsam_unstable/base/CMakeLists.txt @@ -1,6 +1,10 @@ # Install headers file(GLOB base_headers "*.h") -install(FILES ${base_headers} DESTINATION include/gtsam_unstable/base) +if(QNX) + install(FILES ${base_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/base) +else() + install(FILES ${base_headers} DESTINATION include/gtsam_unstable/base) +endif() # Add all tests add_subdirectory(tests) diff --git a/gtsam_unstable/discrete/CMakeLists.txt b/gtsam_unstable/discrete/CMakeLists.txt index 18346a45a..45e073fab 100644 --- a/gtsam_unstable/discrete/CMakeLists.txt +++ b/gtsam_unstable/discrete/CMakeLists.txt @@ -1,6 +1,10 @@ # Install headers file(GLOB discrete_headers "*.h") -install(FILES ${discrete_headers} DESTINATION include/gtsam_unstable/discrete) +if(QNX) + install(FILES ${discrete_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/discrete) +else() + install(FILES ${discrete_headers} DESTINATION include/gtsam_unstable/discrete) +endif() # Add all tests add_subdirectory(tests) diff --git a/gtsam_unstable/dynamics/CMakeLists.txt b/gtsam_unstable/dynamics/CMakeLists.txt index 66aef9455..bd5469f72 100644 --- a/gtsam_unstable/dynamics/CMakeLists.txt +++ b/gtsam_unstable/dynamics/CMakeLists.txt @@ -1,6 +1,10 @@ # Install headers file(GLOB dynamics_headers "*.h") -install(FILES ${dynamics_headers} DESTINATION include/gtsam_unstable/dynamics) +if(QNX) + install(FILES ${dynamics_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/dynamics) +else() + install(FILES ${dynamics_headers} DESTINATION include/gtsam_unstable/dynamics) +endif() # Add all tests add_subdirectory(tests) diff --git a/gtsam_unstable/geometry/CMakeLists.txt b/gtsam_unstable/geometry/CMakeLists.txt index c8b7e250f..3432bab19 100644 --- a/gtsam_unstable/geometry/CMakeLists.txt +++ b/gtsam_unstable/geometry/CMakeLists.txt @@ -1,6 +1,10 @@ # Install headers file(GLOB geometry_headers "*.h") -install(FILES ${geometry_headers} DESTINATION include/gtsam_unstable/geometry) +if(QNX) + install(FILES ${geometry_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/geometry) +else() + install(FILES ${geometry_headers} DESTINATION include/gtsam_unstable/geometry) +endif() # Add all tests add_subdirectory(tests) diff --git a/gtsam_unstable/linear/CMakeLists.txt b/gtsam_unstable/linear/CMakeLists.txt index 99a4b814e..50f7fb5fd 100644 --- a/gtsam_unstable/linear/CMakeLists.txt +++ b/gtsam_unstable/linear/CMakeLists.txt @@ -1,6 +1,10 @@ # Install headers file(GLOB linear_headers "*.h") -install(FILES ${linear_headers} DESTINATION include/gtsam_unstable/linear) +if(QNX) + install(FILES ${linear_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/linear) +else() + install(FILES ${linear_headers} DESTINATION include/gtsam_unstable/linear) +endif() # Add all tests add_subdirectory(tests) diff --git a/gtsam_unstable/nonlinear/CMakeLists.txt b/gtsam_unstable/nonlinear/CMakeLists.txt index 9e0cb68e1..b8483ecab 100644 --- a/gtsam_unstable/nonlinear/CMakeLists.txt +++ b/gtsam_unstable/nonlinear/CMakeLists.txt @@ -1,6 +1,10 @@ # Install headers file(GLOB nonlinear_headers "*.h") -install(FILES ${nonlinear_headers} DESTINATION include/gtsam_unstable/nonlinear) +if(QNX) + install(FILES ${nonlinear_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/nonlinear) +else() + install(FILES ${nonlinear_headers} DESTINATION include/gtsam_unstable/nonlinear) +endif() # Add all tests add_subdirectory(tests) diff --git a/gtsam_unstable/partition/CMakeLists.txt b/gtsam_unstable/partition/CMakeLists.txt index 74951bf93..f9e36a768 100644 --- a/gtsam_unstable/partition/CMakeLists.txt +++ b/gtsam_unstable/partition/CMakeLists.txt @@ -1,5 +1,9 @@ # Install headers file(GLOB partition_headers "*.h") -install(FILES ${partition_headers} DESTINATION include/gtsam_unstable/partition) +if(QNX) + install(FILES ${partition_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/partition) +else() + install(FILES ${partition_headers} DESTINATION include/gtsam_unstable/partition) +endif() add_subdirectory(tests) diff --git a/gtsam_unstable/slam/CMakeLists.txt b/gtsam_unstable/slam/CMakeLists.txt index a86beac63..780de9051 100644 --- a/gtsam_unstable/slam/CMakeLists.txt +++ b/gtsam_unstable/slam/CMakeLists.txt @@ -5,7 +5,11 @@ set (slam_excluded_headers #"") file(GLOB slam_headers "*.h") list(REMOVE_ITEM slam_headers ${slam_excluded_headers}) -install(FILES ${slam_headers} DESTINATION include/gtsam_unstable/slam) +if(QNX) + install(FILES ${slam_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/slam) +else() + install(FILES ${slam_headers} DESTINATION include/gtsam_unstable/slam) +endif() # Add all tests add_subdirectory(tests)