File tree Expand file tree Collapse file tree 5 files changed +19
-5
lines changed
Expand file tree Collapse file tree 5 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ if( NOT is_submodule )
2121 set ( ENABLE_WARNINGS_AS_ERRORS "ON" CACHE PATH "" )
2222
2323 option ( ENABLE_TESTS "Builds tests" ON )
24+ option ( DISABLE_UNIT_TESTS "Disables unit tests but builds gtest." OFF )
2425 option ( ENABLE_EXAMPLES "Builds examples" ON )
2526 option ( ENABLE_BENCHMARKS "Builds benchmarks" ON )
2627 option ( ENABLE_DOCS "Builds documentation" ON )
@@ -60,7 +61,7 @@ if( ENABLE_CALIPER )
6061endif ()
6162
6263
63- if ( ENABLE_TESTS )
64+ if ( ENABLE_TESTS AND NOT DISABLE_UNIT_TESTS )
6465 add_subdirectory ( unitTests )
6566endif ()
6667
Original file line number Diff line number Diff line change @@ -33,8 +33,10 @@ foreach(benchmark ${benchmarkSources})
3333 # blt_add_target_compile_flags( TO ${benchmark_name}
3434 # FLAGS -fsave-optimization-record )
3535
36- blt_add_benchmark( NAME ${benchmark_name}
37- COMMAND ${benchmark_name}
38- )
36+ blt_add_benchmark(NAME ${benchmark_name}
37+ COMMAND ${benchmark_name} )
38+
39+ install (TARGETS ${benchmark_name}
40+ DESTINATION bin)
3941
4042endforeach ()
Original file line number Diff line number Diff line change 99if ( SPHINX_FOUND )
1010 add_subdirectory (sphinx)
1111endif ()
12-
Original file line number Diff line number Diff line change @@ -27,4 +27,7 @@ foreach(example ${exampleSources})
2727 blt_add_test( NAME ${example_name}
2828 COMMAND ${example_name} )
2929
30+ install (TARGETS ${example_name}
31+ DESTINATION bin)
32+
3033endforeach ()
Original file line number Diff line number Diff line change @@ -79,6 +79,9 @@ foreach(test ${testSources})
7979 blt_add_test( NAME ${test_name}
8080 COMMAND ${test_name} )
8181
82+ install (TARGETS ${test_name}
83+ DESTINATION bin)
84+
8285endforeach ()
8386
8487# Add testFloatingPointExceptions which has a dependency to prevent optimizations.
@@ -97,6 +100,9 @@ target_include_directories( testFloatingPointExceptions PUBLIC ${CMAKE_CURRENT_L
97100blt_add_test( NAME testFloatingPointExceptions
98101 COMMAND testFloatingPointExceptions )
99102
103+ install (TARGETS testFloatingPointExceptions
104+ DESTINATION bin)
105+
100106# Add testTensorOps which has multiple translation units to speed up compilation.
101107blt_add_executable( NAME testTensorOps
102108 SOURCES testTensorOps.cpp
@@ -120,3 +126,6 @@ target_include_directories( testTensorOps PUBLIC ${CMAKE_CURRENT_LIST_DIR}/../sr
120126
121127blt_add_test( NAME testTensorOps
122128 COMMAND testTensorOps )
129+
130+ install (TARGETS testTensorOps
131+ DESTINATION bin)
You can’t perform that action at this time.
0 commit comments