Michael Kruse | 05cf9c2 | 2016-08-25 12:36:15 | [diff] [blame] | 1 | add_custom_target(PollyUnitTests) |
| 2 | set_target_properties(PollyUnitTests PROPERTIES FOLDER "Polly") |
| 3 | |
| 4 | # add_polly_unittest(test_dirname file1.cpp file2.cpp) |
| 5 | # |
| 6 | # Will compile the list of files together and link against Polly and its dependences. |
| 7 | function(add_polly_unittest test_name) |
| 8 | if(COMMAND add_unittest) |
| 9 | add_unittest(PollyUnitTests ${test_name} ${ARGN}) |
| 10 | else() |
Michael Kruse | fd4a332 | 2016-08-25 14:33:44 | [diff] [blame] | 11 | add_executable(${test_name} EXCLUDE_FROM_ALL ${ARGN}) |
Michael Kruse | 05cf9c2 | 2016-08-25 12:36:15 | [diff] [blame] | 12 | set_target_properties(${test_name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) |
| 13 | |
Shoaib Meenai | d806af3 | 2017-12-05 21:49:56 | [diff] [blame] | 14 | target_link_libraries(${test_name} PRIVATE gtest_main gtest) |
Michael Kruse | 05cf9c2 | 2016-08-25 12:36:15 | [diff] [blame] | 15 | add_dependencies(PollyUnitTests ${test_name}) |
| 16 | |
| 17 | set_property(TARGET ${test_name} PROPERTY FOLDER "Polly") |
| 18 | endif() |
Shoaib Meenai | d806af3 | 2017-12-05 21:49:56 | [diff] [blame] | 19 | target_link_libraries(${test_name} PRIVATE Polly) |
Michael Kruse | 05cf9c2 | 2016-08-25 12:36:15 | [diff] [blame] | 20 | endfunction() |
| 21 | |
| 22 | add_subdirectory(Isl) |
Michael Kruse | 7886bd7 | 2016-09-08 15:02:36 | [diff] [blame] | 23 | add_subdirectory(Flatten) |
Michael Kruse | e23e94a | 2017-02-15 16:59:10 | [diff] [blame] | 24 | add_subdirectory(DeLICM) |
Philip Pfaffe | 483340b | 2017-05-23 11:28:50 | [diff] [blame] | 25 | add_subdirectory(ScopPassManager) |
Tobias Grosser | feae3df | 2017-08-05 09:38:09 | [diff] [blame] | 26 | add_subdirectory(ScheduleOptimizer) |
Philip Pfaffe | 52025af1 | 2018-06-29 08:17:03 | [diff] [blame] | 27 | add_subdirectory(Support) |