CTest can not find executable file

随声附和 提交于 2021-01-28 10:50:48

问题


I have a question about starting the ctest. As I can understand that ctest uses CTestTestfile.cmake for the beginning of the unit test. What is the executable file? Why does ctest find it as *.exe if it is a CTestTestfile.cmake? What is wrong in my actions?

I have a folder Prj:

Prj folder picture

and folder /build with cmake output (CTestTestfile.cmake is here) as well as all ctest,cmake, etc. programs with their dll (is it right?).

Here is the text of CMakeLists.txt file:

cmake_minimum_required(VERSION 2.8)
project(MyTest C)
enable_testing()
include(CTest)

set(SOURCE_EXE simple_test.c)
include_directories(include)

### The most simple test
add_executable(simple_test ${SOURCE_EXE})
add_subdirectory(src)
target_link_libraries(simple_test "./src")

add_test(NAME simple_test COMMAND simple_test)

I have received the result in Windows cmd:

cmd screen after ctest cmd

来源:https://stackoverflow.com/questions/46305920/ctest-can-not-find-executable-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!