diff --git a/cmake/GtsamTesting.cmake b/cmake/GtsamTesting.cmake index 81358900e..8b290dd85 100644 --- a/cmake/GtsamTesting.cmake +++ b/cmake/GtsamTesting.cmake @@ -242,6 +242,9 @@ 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' + # QNX is cross-compiled for, and does not support make, cmake, or ctest natively. + # Therefore, running tests must be done by manually copying test executables and required data files over. + # for more info, check PR#1968 https://github.com/borglab/gtsam/pull/1968 if(NOT QNX) set_target_properties(${target_name} PROPERTIES EXCLUDE_FROM_ALL ON) endif() diff --git a/gtsam/CMakeLists.txt b/gtsam/CMakeLists.txt index 36a11ac0e..e90c86d94 100644 --- a/gtsam/CMakeLists.txt +++ b/gtsam/CMakeLists.txt @@ -101,6 +101,11 @@ ENDIF(MSVC) # Generate and install config and dllexport files #For config.in searches if(QNX) +# QNX is cross-compiled for, and does not support make, cmake, or ctest natively. Additionally, space is limited in our embedded usecase. +# Therefore, running tests must be done by manually copying test executables and required data files over, preferably avoiding +# copying the whole source tree. Thus, we set the default file lookup to the recommended test folder, with the option +# to manually change it. +# for more info, check PR#1968 https://github.com/borglab/gtsam/pull/1968 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) diff --git a/gtsam/nonlinear/tests/testSerializationNonlinear.cpp b/gtsam/nonlinear/tests/testSerializationNonlinear.cpp index a96ede430..5d5067a29 100644 --- a/gtsam/nonlinear/tests/testSerializationNonlinear.cpp +++ b/gtsam/nonlinear/tests/testSerializationNonlinear.cpp @@ -157,6 +157,11 @@ TEST(Serialization, NoiseModelFactor1_backwards_compatibility) { "/../../gtsam/nonlinear/tests/priorFactor.xml", factor_deserialized_xml); #else + /*QNX is cross-compiled for, and does not support make, cmake, or ctest natively. Additionally, space is a large constraint on embedded systems. + * Therefore, running tests must be done by manually copying test executables and required data files over, preferably avoiding + * copying the whole source tree. Thus, we set the default file lookup to the same folder. Please copy data files to the same folder as this test. + * for more info, check PR#1968 https://github.com/borglab/gtsam/pull/1968 + */ bool c = deserializeFromXMLFile( "priorFactor.xml", factor_deserialized_xml);