I have a test file that uses Boost libraries and it builds correctly. My goal is to run the test cases by setting up a run configuration in QT Creator.
I have tried to set the test file as an executable with cmake, and it builds correctly.
cmake_minimum_required(VERSION 3.5)
project(sps LANGUAGES CXX)
enable_testing()
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Boost COMPONENTS unit_test_framework REQUIRED)
add_executable(test_sps test/test_sps.cpp)
target_link_libraries(test_sps Boost::unit_test_framework)
test/test_sps.cpp looks like this
BOOST_AUTO_TEST_SUITE(SuiteSPS)
BOOST_AUTO_TEST_CASE(TestSingleNode){
...
}
BOOST_AUTO_TEST_CASE(TestSingleBranch){
...
}
BOOST_AUTO_TEST_SUITE_END()
The problem happens when I try to set up a run configuration. I set up a custom executable as the test/test_sps.cpp file, but QT Creator is saying that "The path ... is not an executable file"
How do you set up a run configuration for running Boost tests?