From d35ff2e3f8587ea71e004900d33424d79e7c9dce Mon Sep 17 00:00:00 2001 From: JaiXJM-BB Date: Thu, 16 Jan 2025 09:57:29 -0500 Subject: [PATCH] Updated QNX-relevant paths, removed environment variables. (#2) Updated QNX-relevant paths (will check others next), removed environment variables. --- cmake/GtsamTesting.cmake | 6 +++--- gtsam/3rdparty/ceres/CMakeLists.txt | 7 +------ gtsam/3rdparty/metis/include/CMakeLists.txt | 7 +------ gtsam/CMakeLists.txt | 2 +- gtsam/base/CMakeLists.txt | 14 +++----------- 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 +++---------- .../nonlinear/tests/testSerializationNonlinear.cpp | 1 - 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 +----- tests/testSerializationSlam.cpp | 1 - 26 files changed, 30 insertions(+), 129 deletions(-) diff --git a/cmake/GtsamTesting.cmake b/cmake/GtsamTesting.cmake index 3135ffc187..81358900e1 100644 --- a/cmake/GtsamTesting.cmake +++ b/cmake/GtsamTesting.cmake @@ -197,9 +197,9 @@ macro(gtsamAddTestsGlob_impl groupName globPatterns excludedFiles linkLibraries) # Add TOPSRCDIR set_property(SOURCE ${script_src} APPEND PROPERTY COMPILE_DEFINITIONS "TOPSRCDIR=\"${GTSAM_SOURCE_DIR}\"") - + # Exclude from 'make all' and 'make install' - if(NOT QNX OR NOT DEFINED ENV{QNX_BUILD_TESTS}) + if(NOT QNX) set_target_properties(${script_name} PROPERTIES EXCLUDE_FROM_ALL ON) endif() @@ -242,7 +242,7 @@ macro(gtsamAddTestsGlob_impl groupName globPatterns excludedFiles linkLibraries) set_property(SOURCE ${script_srcs} APPEND PROPERTY COMPILE_DEFINITIONS "TOPSRCDIR=\"${GTSAM_SOURCE_DIR}\"") # Exclude from 'make all' and 'make install' - if(NOT QNX OR NOT DEFINED ENV{QNX_BUILD_TESTS}) + if(NOT QNX) set_target_properties(${target_name} PROPERTIES EXCLUDE_FROM_ALL ON) endif() diff --git a/gtsam/3rdparty/ceres/CMakeLists.txt b/gtsam/3rdparty/ceres/CMakeLists.txt index e8d39da67c..abef46fb39 100644 --- a/gtsam/3rdparty/ceres/CMakeLists.txt +++ b/gtsam/3rdparty/ceres/CMakeLists.txt @@ -1,7 +1,2 @@ file(GLOB ceres_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -if(NOT QNX) - install(FILES ${ceres_headers} DESTINATION include/gtsam/3rdparty/ceres) -else() - #Install in the install include directory rather than at the install prefix. - install(FILES ${ceres_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/3rdparty/ceres) -endif() \ No newline at end of file +install(FILES ${ceres_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/3rdparty/ceres) \ No newline at end of file diff --git a/gtsam/3rdparty/metis/include/CMakeLists.txt b/gtsam/3rdparty/metis/include/CMakeLists.txt index 0d5af2e835..e62e444af1 100644 --- a/gtsam/3rdparty/metis/include/CMakeLists.txt +++ b/gtsam/3rdparty/metis/include/CMakeLists.txt @@ -1,6 +1 @@ -if(NOT QNX) - install(FILES metis.h DESTINATION include/gtsam/3rdparty/metis) -else() - #Install in the install include directory rather than at the install prefix. - install(FILES metis.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/3rdparty/metis) -endif() \ No newline at end of file +install(FILES metis.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/3rdparty/metis) \ No newline at end of file diff --git a/gtsam/CMakeLists.txt b/gtsam/CMakeLists.txt index db4a982a03..36a11ac0e1 100644 --- a/gtsam/CMakeLists.txt +++ b/gtsam/CMakeLists.txt @@ -101,7 +101,7 @@ ENDIF(MSVC) # Generate and install config and dllexport files #For config.in searches if(QNX) -set(QNX_TARGET_DATASET_DIR "$ENV{QNX_TARGET_DATASET_DIR}") +set(QNX_TARGET_DATASET_DIR "/data/home/root/qnxuser/test" CACHE STRING "Path to your on-target testing folder.") endif() configure_file(config.h.in config.h) set(library_name GTSAM) # For substitution in dllexport.h.in diff --git a/gtsam/base/CMakeLists.txt b/gtsam/base/CMakeLists.txt index 2989bbaab3..1ab671bdc5 100644 --- a/gtsam/base/CMakeLists.txt +++ b/gtsam/base/CMakeLists.txt @@ -1,17 +1,9 @@ # Install headers -# Header groups file(GLOB base_headers "*.h") -file(GLOB base_headers_tree "treeTraversal/*.h") +install(FILES ${base_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/base) -# Installation -if(NOT QNX) - install(FILES ${base_headers} DESTINATION include/gtsam/base) - install(FILES ${base_headers_tree} DESTINATION include/gtsam/base/treeTraversal) -else() - # For QNX, Install in the Installation's Include Directory - install(FILES ${base_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/base) - install(FILES ${base_headers_tree} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/base/treeTraversal) -endif() +file(GLOB base_headers_tree "treeTraversal/*.h") +install(FILES ${base_headers_tree} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/base/treeTraversal) # Build tests add_subdirectory(tests) diff --git a/gtsam/basis/CMakeLists.txt b/gtsam/basis/CMakeLists.txt index 98e6076e9a..e13af1dab9 100644 --- a/gtsam/basis/CMakeLists.txt +++ b/gtsam/basis/CMakeLists.txt @@ -1,10 +1,6 @@ # Install headers file(GLOB basis_headers "*.h") -if(NOT QNX) - install(FILES ${basis_headers} DESTINATION include/gtsam/basis) -else() - install(FILES ${basis_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/basis) -endif() +install(FILES ${basis_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/basis) # Build tests add_subdirectory(tests) diff --git a/gtsam/discrete/CMakeLists.txt b/gtsam/discrete/CMakeLists.txt index a4b5cc6818..bd4d823c5a 100644 --- a/gtsam/discrete/CMakeLists.txt +++ b/gtsam/discrete/CMakeLists.txt @@ -2,11 +2,7 @@ set(subdir discrete) file(GLOB discrete_headers "*.h") # FIXME: exclude headers -if(QNX) - install(FILES ${discrete_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/discrete) -else() - install(FILES ${discrete_headers} DESTINATION include/gtsam/discrete) -endif() +install(FILES ${discrete_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/discrete) # Add all tests add_subdirectory(tests) diff --git a/gtsam/geometry/CMakeLists.txt b/gtsam/geometry/CMakeLists.txt index fb96d23deb..4ec545946c 100644 --- a/gtsam/geometry/CMakeLists.txt +++ b/gtsam/geometry/CMakeLists.txt @@ -1,10 +1,6 @@ # Install headers file(GLOB geometry_headers "*.h") -if(QNX) - install(FILES ${geometry_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/geometry) -else() - install(FILES ${geometry_headers} DESTINATION include/gtsam/geometry) -endif() +install(FILES ${geometry_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/geometry) # Build tests add_subdirectory(tests) diff --git a/gtsam/inference/CMakeLists.txt b/gtsam/inference/CMakeLists.txt index 2344221bc3..c028db92da 100644 --- a/gtsam/inference/CMakeLists.txt +++ b/gtsam/inference/CMakeLists.txt @@ -1,10 +1,6 @@ # Install headers file(GLOB inference_headers "*.h") -if(QNX) - install(FILES ${inference_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/inference) -else() - install(FILES ${inference_headers} DESTINATION include/gtsam/inference) -endif() +install(FILES ${inference_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/inference) # Build tests add_subdirectory(tests) diff --git a/gtsam/linear/CMakeLists.txt b/gtsam/linear/CMakeLists.txt index e3947851cf..adba2a0786 100644 --- a/gtsam/linear/CMakeLists.txt +++ b/gtsam/linear/CMakeLists.txt @@ -1,10 +1,6 @@ # Install headers file(GLOB linear_headers "*.h") -if(QNX) - install(FILES ${linear_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/linear) -else() - install(FILES ${linear_headers} DESTINATION include/gtsam/linear) -endif() +install(FILES ${linear_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/linear) # Build tests add_subdirectory(tests) diff --git a/gtsam/navigation/CMakeLists.txt b/gtsam/navigation/CMakeLists.txt index c266b353a1..67795cbf45 100644 --- a/gtsam/navigation/CMakeLists.txt +++ b/gtsam/navigation/CMakeLists.txt @@ -1,10 +1,6 @@ # Install headers file(GLOB navigation_headers "*.h") -if(QNX) - install(FILES ${navigation_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/navigation) -else() - install(FILES ${navigation_headers} DESTINATION include/gtsam/navigation) -endif() +install(FILES ${navigation_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/navigation) # Add all tests add_subdirectory(tests) diff --git a/gtsam/nonlinear/CMakeLists.txt b/gtsam/nonlinear/CMakeLists.txt index 98facc59ee..1347fec2fe 100644 --- a/gtsam/nonlinear/CMakeLists.txt +++ b/gtsam/nonlinear/CMakeLists.txt @@ -1,16 +1,9 @@ # Install headers file(GLOB nonlinear_headers "*.h") -if(QNX) - install(FILES ${nonlinear_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/nonlinear) -else() - install(FILES ${nonlinear_headers} DESTINATION include/gtsam/nonlinear) -endif() +install(FILES ${nonlinear_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/nonlinear) file(GLOB nonlinear_headers_internal "internal/*.h") -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() +install(FILES ${nonlinear_headers_internal} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/nonlinear/internal) + # Build tests add_subdirectory(tests) diff --git a/gtsam/nonlinear/tests/testSerializationNonlinear.cpp b/gtsam/nonlinear/tests/testSerializationNonlinear.cpp index 566aee6721..a96ede4309 100644 --- a/gtsam/nonlinear/tests/testSerializationNonlinear.cpp +++ b/gtsam/nonlinear/tests/testSerializationNonlinear.cpp @@ -32,7 +32,6 @@ using namespace std; using namespace gtsam; using namespace gtsam::serializationTestHelpers; - /* ************************************************************************* */ // Create GUIDs for Noisemodels BOOST_CLASS_EXPORT_GUID(gtsam::noiseModel::Diagonal, "gtsam_noiseModel_Diagonal") diff --git a/gtsam/sam/CMakeLists.txt b/gtsam/sam/CMakeLists.txt index 0ba13f8379..204bef3ada 100644 --- a/gtsam/sam/CMakeLists.txt +++ b/gtsam/sam/CMakeLists.txt @@ -1,10 +1,6 @@ # Install headers file(GLOB sam_headers "*.h") -if(QNX) - install(FILES ${sam_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/sam) -else() - install(FILES ${sam_headers} DESTINATION include/gtsam/sam) -endif() +install(FILES ${sam_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/sam) # Build tests add_subdirectory(tests) diff --git a/gtsam/sfm/CMakeLists.txt b/gtsam/sfm/CMakeLists.txt index c3286d81aa..4b9dfe6fed 100644 --- a/gtsam/sfm/CMakeLists.txt +++ b/gtsam/sfm/CMakeLists.txt @@ -1,10 +1,6 @@ # Install headers file(GLOB sfm_headers "*.h") -if(QNX) - install(FILES ${sfm_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/sfm) -else() - install(FILES ${sfm_headers} DESTINATION include/gtsam/sfm) -endif() +install(FILES ${sfm_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/sfm) # Build tests add_subdirectory(tests) diff --git a/gtsam/slam/CMakeLists.txt b/gtsam/slam/CMakeLists.txt index b35293912d..66bb168fe9 100644 --- a/gtsam/slam/CMakeLists.txt +++ b/gtsam/slam/CMakeLists.txt @@ -4,11 +4,7 @@ set (slam_excluded_headers #"") ) file(GLOB slam_headers "*.h") -if(QNX) - install(FILES ${slam_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/slam) -else() - install(FILES ${slam_headers} DESTINATION include/gtsam/slam) -endif() +install(FILES ${slam_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/slam) # Build tests add_subdirectory(tests) diff --git a/gtsam/symbolic/CMakeLists.txt b/gtsam/symbolic/CMakeLists.txt index 2c25a0970b..e72733a0ca 100644 --- a/gtsam/symbolic/CMakeLists.txt +++ b/gtsam/symbolic/CMakeLists.txt @@ -1,10 +1,6 @@ # Install headers file(GLOB symbolic_headers "*.h") -if(QNX) - install(FILES ${symbolic_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/symbolic) -else() - install(FILES ${symbolic_headers} DESTINATION include/gtsam/symbolic) -endif() +install(FILES ${symbolic_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam/symbolic) # Build tests add_subdirectory(tests) diff --git a/gtsam_unstable/base/CMakeLists.txt b/gtsam_unstable/base/CMakeLists.txt index b638302d87..bbeb5b1908 100644 --- a/gtsam_unstable/base/CMakeLists.txt +++ b/gtsam_unstable/base/CMakeLists.txt @@ -1,10 +1,6 @@ # Install headers file(GLOB base_headers "*.h") -if(QNX) - install(FILES ${base_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/base) -else() - install(FILES ${base_headers} DESTINATION include/gtsam_unstable/base) -endif() +install(FILES ${base_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/base) # Add all tests add_subdirectory(tests) diff --git a/gtsam_unstable/discrete/CMakeLists.txt b/gtsam_unstable/discrete/CMakeLists.txt index 45e073fab4..0576cf22bd 100644 --- a/gtsam_unstable/discrete/CMakeLists.txt +++ b/gtsam_unstable/discrete/CMakeLists.txt @@ -1,10 +1,6 @@ # Install headers file(GLOB discrete_headers "*.h") -if(QNX) - install(FILES ${discrete_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/discrete) -else() - install(FILES ${discrete_headers} DESTINATION include/gtsam_unstable/discrete) -endif() +install(FILES ${discrete_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/discrete) # Add all tests add_subdirectory(tests) diff --git a/gtsam_unstable/dynamics/CMakeLists.txt b/gtsam_unstable/dynamics/CMakeLists.txt index bd5469f728..4e24d9d19f 100644 --- a/gtsam_unstable/dynamics/CMakeLists.txt +++ b/gtsam_unstable/dynamics/CMakeLists.txt @@ -1,10 +1,6 @@ # Install headers file(GLOB dynamics_headers "*.h") -if(QNX) - install(FILES ${dynamics_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/dynamics) -else() - install(FILES ${dynamics_headers} DESTINATION include/gtsam_unstable/dynamics) -endif() +install(FILES ${dynamics_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/dynamics) # Add all tests add_subdirectory(tests) diff --git a/gtsam_unstable/geometry/CMakeLists.txt b/gtsam_unstable/geometry/CMakeLists.txt index 3432bab190..986015be1a 100644 --- a/gtsam_unstable/geometry/CMakeLists.txt +++ b/gtsam_unstable/geometry/CMakeLists.txt @@ -1,10 +1,6 @@ # Install headers file(GLOB geometry_headers "*.h") -if(QNX) - install(FILES ${geometry_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/geometry) -else() - install(FILES ${geometry_headers} DESTINATION include/gtsam_unstable/geometry) -endif() +install(FILES ${geometry_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/geometry) # Add all tests add_subdirectory(tests) diff --git a/gtsam_unstable/linear/CMakeLists.txt b/gtsam_unstable/linear/CMakeLists.txt index 50f7fb5fd1..a1bced8431 100644 --- a/gtsam_unstable/linear/CMakeLists.txt +++ b/gtsam_unstable/linear/CMakeLists.txt @@ -1,10 +1,6 @@ # Install headers file(GLOB linear_headers "*.h") -if(QNX) - install(FILES ${linear_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/linear) -else() - install(FILES ${linear_headers} DESTINATION include/gtsam_unstable/linear) -endif() +install(FILES ${linear_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/linear) # Add all tests add_subdirectory(tests) diff --git a/gtsam_unstable/nonlinear/CMakeLists.txt b/gtsam_unstable/nonlinear/CMakeLists.txt index b8483ecaba..a80a9fc55a 100644 --- a/gtsam_unstable/nonlinear/CMakeLists.txt +++ b/gtsam_unstable/nonlinear/CMakeLists.txt @@ -1,10 +1,6 @@ # Install headers file(GLOB nonlinear_headers "*.h") -if(QNX) - install(FILES ${nonlinear_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/nonlinear) -else() - install(FILES ${nonlinear_headers} DESTINATION include/gtsam_unstable/nonlinear) -endif() +install(FILES ${nonlinear_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/nonlinear) # Add all tests add_subdirectory(tests) diff --git a/gtsam_unstable/partition/CMakeLists.txt b/gtsam_unstable/partition/CMakeLists.txt index f9e36a7680..74195d882a 100644 --- a/gtsam_unstable/partition/CMakeLists.txt +++ b/gtsam_unstable/partition/CMakeLists.txt @@ -1,9 +1,5 @@ # Install headers file(GLOB partition_headers "*.h") -if(QNX) - install(FILES ${partition_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/partition) -else() - install(FILES ${partition_headers} DESTINATION include/gtsam_unstable/partition) -endif() +install(FILES ${partition_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/partition) add_subdirectory(tests) diff --git a/gtsam_unstable/slam/CMakeLists.txt b/gtsam_unstable/slam/CMakeLists.txt index 780de90519..83d3ca4763 100644 --- a/gtsam_unstable/slam/CMakeLists.txt +++ b/gtsam_unstable/slam/CMakeLists.txt @@ -5,11 +5,7 @@ set (slam_excluded_headers #"") file(GLOB slam_headers "*.h") list(REMOVE_ITEM slam_headers ${slam_excluded_headers}) -if(QNX) - install(FILES ${slam_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/slam) -else() - install(FILES ${slam_headers} DESTINATION include/gtsam_unstable/slam) -endif() +install(FILES ${slam_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gtsam_unstable/slam) # Add all tests add_subdirectory(tests) diff --git a/tests/testSerializationSlam.cpp b/tests/testSerializationSlam.cpp index c4170b1089..a294857204 100644 --- a/tests/testSerializationSlam.cpp +++ b/tests/testSerializationSlam.cpp @@ -634,7 +634,6 @@ TEST(SubgraphSolver, Solves) { KeyInfo keyInfo(Ab); std::map lambda; system.build(Ab, keyInfo, lambda); - // Create a perturbed (non-zero) RHS const auto xbar = system.Rc1().optimize(); // merely for use in zero below auto values_y = VectorValues::Zero(xbar);