Skip to content

Commit e3d6c40

Browse files
committed
Don't always add tools/test as this ignores TEST_SUITE_SUBDIRS.
Unconditionally adding tools/test breaks setups using TEST_SUITE_SUBDIRS, including PGO builds which will try to build the test binaries without collecting profile info for them. Separately add tools/test when collecting test suite subdirs.
1 parent 1cea1a9 commit e3d6c40

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,8 @@ if(NOT TEST_SUITE_SUBDIRS)
360360
if(NOT TEST_SUITE_FORTRAN)
361361
list(REMOVE_ITEM TEST_SUITE_SUBDIRS Fortran)
362362
endif()
363+
# Separately add tests for tools.
364+
list(APPEND TEST_SUITE_SUBDIRS tools/test)
363365
set(TEST_SUITE_SUBDIRS "${TEST_SUITE_SUBDIRS}")
364366
endif()
365367
set(TEST_SUITE_SUBDIRS "${TEST_SUITE_SUBDIRS}" CACHE STRING

tools/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,3 @@ else()
4141
endif()
4242

4343
add_executable(not ${CMAKE_CURRENT_SOURCE_DIR}/not.cpp)
44-
45-
# Always add the test subdirectory. After all, we really should test these
46-
# tools.
47-
add_subdirectory(test)

0 commit comments

Comments
 (0)