Skip to content

Commit

Permalink
Add support for networking tests
Browse files Browse the repository at this point in the history
  • Loading branch information
FergusonAJ committed Oct 19, 2023
1 parent 7205928 commit 2c84a71
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wcast-align -Winfinite-recursion -Wnon-virtu
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-DNDEBUG")

# Configure SFML
set(SFML_SRC_DIR third_party/SFML)
set(SFML_BUILD_DIR sfml_build)
add_subdirectory(${SFML_SRC_DIR} ${SFML_BUILD_DIR})
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")

# Place all executables in the executable directory
Expand All @@ -35,10 +40,6 @@ file(COPY ./assets DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

# Build the main application executables, if requested
if(${BUILD_MAIN})
# Configure SFML
set(SFML_SRC_DIR third_party/SFML)
set(SFML_BUILD_DIR sfml_build)
add_subdirectory(${SFML_SRC_DIR} ${SFML_BUILD_DIR})

# Find all the main files for the various applications
# Currently this means any *.cpp file in the root of source
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/core/Loopback.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@
target_link_libraries(${EXE_NAME}
PRIVATE sfml-network
)
target_include_directories(${EXE_NAME}
PRIVATE ${CMAKE_SOURCE_DIR}/third_party/SFML/include
)

0 comments on commit 2c84a71

Please sign in to comment.