Partially revert upstream PR 62, e70d90d045e339374abda3fa664904fbba7f8d67, so that 'make test' will find our binary to run tests with. --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,11 +104,8 @@ add_subdirectory(include) # checked out. if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/tests/CMakeLists.txt) enable_testing() - set(EDITORCONFIG_CMD "editorconfig_bin") + set(EDITORCONFIG_CMD "${PROJECT_BINARY_DIR}/bin/editorconfig") set(EDITORCONFIG_CMD_IS_TARGET TRUE) - # TRUE => use the given CMake target, here, "editorconfig_bin", - # rather than an executable file named "editorconfig_bin". - # Used by tests/CMakeLists.txt. add_subdirectory(tests) message(STATUS "Tests enabled") else() @@ -116,7 +113,3 @@ else() " Testing files are not found. Testing will not be available. If you obtained the source tree through git, please run `git submodule update --init` to update the tests submodule.") endif() -# This is a way to find the EXE name for debugging. However, it issues a -# CMake warning under policy CMP0026. -#get_target_property(out_name editorconfig_bin LOCATION) -#message(STATUS "main: Editorconfig binary will be in -${out_name}-")