Skip to content
Snippets Groups Projects
CMakeLists.txt 686 B
Newer Older
  • Learn to ignore specific revisions
  • Wuttke, Joachim's avatar
    Wuttke, Joachim committed
    # To run the tests on Linux, use 'make test' or 'ctest'.
    # To select which tests to run, use 'ctest -R regex'.
    # To see output from the individual tests, use 'ctest -V'.
    # For more options, run 'ctest --help'.
    
    enable_testing()
    
    # We glob test sources, though this is often considered evil.
    # Just touch CMakeLists.txt each time a test is added or withdrawn.
    
    file(GLOB test_sources "*.f2t")
    
    foreach(test_src ${test_sources})
        # remove directory path and suffix, to retain just the name of the test
        string(REGEX REPLACE ".*/" "" test_name "${test_src}")
        string(REGEX REPLACE ".f2t$" "" test_name "${test_name}")
        add_test(${test_name} "${test_src}")
    endforeach(test_src)