Skip to content
Snippets Groups Projects
  • Sergey Kosukhin's avatar
    a66da626
    Update gtest_helper.cmake (!38) · a66da626
    Sergey Kosukhin authored and Yen-Chen Chen's avatar Yen-Chen Chen committed
    
    This updates the `add_icon_c_test` macro in `cmake/gtest_helper.cmake`:
    1. The macro is turned into a function to avoid namespace pollution.
    2. The function is renamed to `fs_add_c_test`.
    3. The function now accepts named options `SOURCES` (followed by a list of source files of the test) and `ARGS` (followed by a list of command-line arguments for the test).
    4. The old signature of the macro is still supported, i.e. it is possible to call something like `add_c_test(UtilHashTest ctest_util_hash.cpp)`, but it made sense to me to switch to the new one.
    5. The `UtilFileTest` test is now provided with an extra command-line argument and it runs on `${CMAKE_CURRENT_BINARY_DIR}` instead of `.` as it was before !28.
    
    Co-authored-by: default avatarYen-Chen Chen <yen-chen.chen@kit.edu>
    Approved-by: default avatarTerry Cojean <terry.cojean@kit.edu>
    Merged-by: default avatarYen-Chen Chen <yen-chen.chen@kit.edu>
    Changelog: other
    a66da626
    History
    Update gtest_helper.cmake (!38)
    Sergey Kosukhin authored and Yen-Chen Chen's avatar Yen-Chen Chen committed
    
    This updates the `add_icon_c_test` macro in `cmake/gtest_helper.cmake`:
    1. The macro is turned into a function to avoid namespace pollution.
    2. The function is renamed to `fs_add_c_test`.
    3. The function now accepts named options `SOURCES` (followed by a list of source files of the test) and `ARGS` (followed by a list of command-line arguments for the test).
    4. The old signature of the macro is still supported, i.e. it is possible to call something like `add_c_test(UtilHashTest ctest_util_hash.cpp)`, but it made sense to me to switch to the new one.
    5. The `UtilFileTest` test is now provided with an extra command-line argument and it runs on `${CMAKE_CURRENT_BINARY_DIR}` instead of `.` as it was before !28.
    
    Co-authored-by: default avatarYen-Chen Chen <yen-chen.chen@kit.edu>
    Approved-by: default avatarTerry Cojean <terry.cojean@kit.edu>
    Merged-by: default avatarYen-Chen Chen <yen-chen.chen@kit.edu>
    Changelog: other