Skip to content

Commit

Permalink
Merge pull request #1926 from Sonicadvance1/no_irloader_on_no_tests
Browse files Browse the repository at this point in the history
IRLoader/TestHarnessLoader: Don't build if not building tests
  • Loading branch information
Stefanos Kornilios Mitsis Poiitidis authored Aug 21, 2022
2 parents 84a95ad + cd69159 commit 097184c
Showing 1 changed file with 30 additions and 28 deletions.
58 changes: 30 additions & 28 deletions Source/Tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,18 +164,20 @@ install(TARGETS FEXBash
COMPONENT runtime
)

add_executable(TestHarnessRunner TestHarnessRunner/HostRunner.cpp TestHarnessRunner.cpp)
target_include_directories(TestHarnessRunner
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/Source/
${CMAKE_BINARY_DIR}/generated
)
target_link_libraries(TestHarnessRunner
PRIVATE
${LIBS}
LinuxEmulation
${PTHREAD_LIB}
)

if (BUILD_TESTS)
add_executable(TestHarnessRunner TestHarnessRunner/HostRunner.cpp TestHarnessRunner.cpp)
target_include_directories(TestHarnessRunner
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/Source/
${CMAKE_BINARY_DIR}/generated
)
target_link_libraries(TestHarnessRunner
PRIVATE
${LIBS}
LinuxEmulation
${PTHREAD_LIB}
)

# add_executable(UnitTestGenerator UnitTestGenerator.cpp)
# target_include_directories(UnitTestGenerator
Expand All @@ -189,19 +191,19 @@ target_link_libraries(TestHarnessRunner
# )
#

add_executable(IRLoader
IRLoader.cpp
)
target_include_directories(IRLoader
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/Source/
${CMAKE_BINARY_DIR}/generated
)
target_link_libraries(IRLoader
PRIVATE
${LIBS}
LinuxEmulation
${PTHREAD_LIB}
fmt::fmt
)

add_executable(IRLoader
IRLoader.cpp
)
target_include_directories(IRLoader
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/Source/
${CMAKE_BINARY_DIR}/generated
)
target_link_libraries(IRLoader
PRIVATE
${LIBS}
LinuxEmulation
${PTHREAD_LIB}
fmt::fmt
)
endif()

0 comments on commit 097184c

Please sign in to comment.