ayaankhan98 / bigINT

Efficient OpenSource Big Integer(Library) Support for C++
Boost Software License 1.0
6 stars 26 forks source link

Command file(COPY) not working as expected. #54

Closed ufrshubham closed 4 years ago

ufrshubham commented 4 years ago

Describe the bug Command file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/input.txt DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/input.txt) in tests/operators/CMakeLists.txt actually copies input.txt under build/tests/operators/input.txt/input.txt

This means when tests try to open input.txt, they are opening a directory instead of actual *.txt file. Surprisingly std::ifstream::is_open() return true in such cases, causing the tests to be reported as pass with ever being run.

The command should be file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/input.txt DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)

To Reproduce Steps to reproduce the behavior:

  1. Configure the project with cmake.
  2. See the directory structure under build/tests/

Expected behavior The additional input.txt directory should not be created.

Screenshots image

Desktop: