Warning, /acts/Detray/tests/unit_tests/io/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # This file is part of the ACTS project.
0002 #
0003 # Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 #
0005 # This Source Code Form is subject to the terms of the Mozilla Public
0006 # License, v. 2.0. If a copy of the MPL was not distributed with this
0007 # file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008
0009 # Helper function for running a test in a specific directory.
0010 function(_run_test_in_dir test dir)
0011 # Make the directory.
0012 file(MAKE_DIRECTORY "${dir}")
0013 # Run the test in that directory.
0014 set_tests_properties(
0015 "detray_unit_test_${test}"
0016 PROPERTIES WORKING_DIRECTORY "${dir}"
0017 )
0018 endfunction()
0019
0020 # Set up the I/O tests. Running the reader and writer tests in separate
0021 # directories, so that they would not interfere with each other.
0022 detray_add_unit_test( io_payloads
0023 "io_json_payload.cpp"
0024 LINK_LIBRARIES GTest::gtest_main detray::core_array detray::io_array
0025 )
0026
0027 detray_add_unit_test( io_writer
0028 "io_json_detector_writer.cpp"
0029 LINK_LIBRARIES GTest::gtest_main vecmem::core detray::core_array detray::io_array detray::test_framework detray::test_common
0030 )
0031 _run_test_in_dir( io_writer
0032 "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/io_writer_test_rundir"
0033 )