I try to build and run tests on Windows in CLion. My project is built and is runnable, but test after build fails with exit code -1073741515 (0xC0000135). My cmakefile fot folder with tests:
project(testBaseProperties)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOSTATICPLUGINS ON)
set(BUILD_SHARED_LIBS OFF)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.dll;")
find_package(Qt5 REQUIRED Test)
include_directories( ${CMAKE_SOURCE_DIR} ${QtQml_INCLUDE_DIRS})
add_executable(${PROJECT_NAME}
#tst_property.cpp
Foo.cpp
${QT_RESOURCES}
)
add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME})
target_include_directories(${PROJECT_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../..
${QtQml_INCLUDE_DIRS}
)
target_link_libraries(${PROJECT_NAME} PUBLIC
Properties
Qt5::Test
Qt5::Qml
Qt5::Core
)
My test code is:
#include <QtTest/QtTest>
class Foo : public QObject {
Q_OBJECT
private slots:
void t1() { QVERIFY(true); }
};
QTEST_APPLESS_MAIN(Foo)
#include "Foo.moc"
I thought that problem is with PATH variable, but it does not helped me. ALso the strange thing is that project works, but test not.