Skip to content

Commit

Permalink
streamline cmake and wscript for same behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
suhrm committed May 31, 2024
1 parent d6b377a commit 9cccf76
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ install(

# Is top level project?
if (${PROJECT_NAME} STREQUAL ${STEINWURF_TOP_NAME})
if (UNIX AND NOT APPLE)

enable_testing()

if (CMAKE_C_COMPILER_ID MATCHES "MSVC")
Expand All @@ -110,19 +112,9 @@ if (${PROJECT_NAME} STREQUAL ${STEINWURF_TOP_NAME})
list(APPEND tunnel_test_sources test/tunnel_tests.cpp)
list(FILTER tunnel_test_sources EXCLUDE REGEX "[.]*\/platform[.]*")

if (UNIX AND NOT APPLE)
# Linux-specific code
file(GLOB_RECURSE linux_sources test/src/detail/platform_linux/*.cpp)
list(APPEND tunnel_test_sources ${linux_sources})
elseif (APPLE)
# Apple-Darwin-specific code
file(GLOB_RECURSE darwin_sources test/src/detail/platform_unsupported/*.cpp)
list(APPEND tunnel_test_sources ${darwin_sources})
elseif (WIN32)
# Windows-specific code
file(GLOB_RECURSE windows_sources test/src/detail/platform_unsupported/*.cpp)
list(APPEND tunnel_test_sources ${windows_sources})
endif ()
# Linux-specific code
file(GLOB_RECURSE linux_sources test/src/detail/platform_linux/*.cpp)
list(APPEND tunnel_test_sources ${linux_sources})


# Build test executable
Expand Down Expand Up @@ -151,4 +143,5 @@ if (${PROJECT_NAME} STREQUAL ${STEINWURF_TOP_NAME})
add_test(tunnel_tests tunnel_tests)

add_subdirectory("apps/app")
endif ()
endif ()

0 comments on commit 9cccf76

Please sign in to comment.