This allows the test file to run correctly when maeparser is included from another CMake project. Also, it is possible to disable building the tests.
Not getting this path right was a problem if we want to include Maeparser from other CMake projects using the add_subdirectory() command: Maeparser would be build (assuming all the setup is correct), but the test would always fail, as there was no way to disable it, and ctest would get the wrong patch, since it expects it to live at the main project's directory.
This allows the test file to run correctly when maeparser is included from another CMake project. Also, it is possible to disable building the tests.
Not getting this path right was a problem if we want to include Maeparser from other CMake projects using the
add_subdirectory()
command: Maeparser would be build (assuming all the setup is correct), but the test would always fail, as there was no way to disable it, andctest
would get the wrong patch, since it expects it to live at the main project's directory.(This is required for https://github.com/schrodinger/coordgenlibs/pull/41, which will stay as a draft until this and some other quirks are resolved)