You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use the cmake testing environment for an external we have been developing but I get a seg fault whenever I go to run the test. The external otherwise builds and operates perfectly fine in max.
I assume it has something to do with how I link the external library to the test build.
I use this line in my CMake for the external
target_link_libraries(${TEST_NAME} PRIVATE hidapi::hidapi)
This links the hidapi to the test file. I did this based off of what happens in min-object-unittest.cmake to create the test file itself. The test executable otherwise cannot find the hidapi.h files in my external.
Whenever I run a simple test that should only create my object the code segfaults at the line
SCENARIO(...
Here is my full test file
/// @file
/// @InGroup minexamples
/// @copyright Copyright 2018 The Min-DevKit Authors. All rights reserved.
/// @license Use of this source code is governed by the MIT License found in the License.md file.
#include "c74_min_unittest.h" // required unit test header
#include "min.manta.cpp" // need the source of our object so that we can access it
SCENARIO("object produces correct output") {
std::cout << "constructor called " << c74::min::endl;
ext_main(nullptr); // every unit test must call ext_main() once to configure the class
I am trying to use the cmake testing environment for an external we have been developing but I get a seg fault whenever I go to run the test. The external otherwise builds and operates perfectly fine in max.
I assume it has something to do with how I link the external library to the test build.
I use this line in my CMake for the external
target_link_libraries(${TEST_NAME} PRIVATE hidapi::hidapi)
This links the hidapi to the test file. I did this based off of what happens in min-object-unittest.cmake to create the test file itself. The test executable otherwise cannot find the hidapi.h files in my external.
Whenever I run a simple test that should only create my object the code segfaults at the line
SCENARIO(...
Here is my full test file
/// @file
/// @InGroup minexamples
/// @copyright Copyright 2018 The Min-DevKit Authors. All rights reserved.
/// @license Use of this source code is governed by the MIT License found in the License.md file.
#include "c74_min_unittest.h" // required unit test header
#include "min.manta.cpp" // need the source of our object so that we can access it
// Unit tests are written using the Catch framework as described at
// https://github.com/philsquared/Catch/blob/master/docs/tutorial.md
SCENARIO("object produces correct output") {
std::cout << "constructor called " << c74::min::endl;
ext_main(nullptr); // every unit test must call ext_main() once to configure the class
}
It does run the line right before ext_main but after that nothing gets run.
Here is a link to the repo for anyone interested https://github.com/spiricom/MantaMaxObject
The text was updated successfully, but these errors were encountered: