Skip to content

Commit

Permalink
Add definitions to the compiler
Browse files Browse the repository at this point in the history
If using a Unix system or Cygwin, the compiler seems to need further options.
This patch changes CMakelist.txt to create a makefile with the options
automatically up to the environment, which is for Unix and Cygwin.
  • Loading branch information
4ge32 committed Feb 13, 2019
1 parent 9cc02e7 commit a93c084
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,11 @@ if(WIN32)
target_link_libraries(${PROJECT_NAME} "-lbcrypt" "-lws2_32")
endif()

if(UNIX AND NOT APPLE)
add_definitions(-D_GNU_SOURCE -DBOOST_ASIO_HAS_STD_STRING_VIEW)
elseif(CYGWIN)
add_definitions(-D_GNU_SOURCE -DBOOST_ASIO_HAS_STD_STRING_VIEW -Wa, -mbing-obj)
endif()


install(TARGETS poac DESTINATION bin)

0 comments on commit a93c084

Please sign in to comment.