Skip to content

Commit

Permalink
target-specific compile definitions, fix CI/CD appveyor
Browse files Browse the repository at this point in the history
  • Loading branch information
alextwothousand committed Aug 5, 2021
1 parent 8abe375 commit bd04c6d
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
cmake_minimum_required(VERSION 3.0)
project(enet C)

if(MSVC)
add_definitions(-W3)
else()
add_definitions(-Wno-error)
endif()

target_include_directories(enet PUBLIC ${PROJECT_SOURCE_DIR}/include)

if (ENET_STATIC)
add_library(enet STATIC test/library.c)

Expand All @@ -33,3 +25,12 @@ if (ENET_TEST)
target_link_libraries(enet_test winmm ws2_32)
endif()
endif()


if(MSVC)
target_compile_definitions(enet PRIVATE -W3)
else()
target_compile_definitions(enet PRIVATE -Wno-error)
endif()

target_include_directories(enet PUBLIC ${PROJECT_SOURCE_DIR}/include)

0 comments on commit bd04c6d

Please sign in to comment.