sinemakinci1 / Cpp-Copilot-VSC-Demo

0 stars 0 forks source link

Put test build behind `ENABLE_TESTING` check #9

Open TartanLlama opened 1 month ago

TartanLlama commented 1 month ago

It's idiomatic to put test building behind a check of ENABLE_TESTING, which is defined by CTest:

if(BUILD_TESTING)
    add_executable(calculatortests src/test_main.cpp src/calculator.cpp)
    add_test(NAME calculator COMMAND calculatortests)
endif()
sinemakinci1 commented 1 month ago

@TartanLlama Can you look at the CMakeLists.txt/test_calculator.cpp files in the new-user-info branch? I believe this testing in alex-gui-changes branch is out of date.