Skip to content

Commit

Permalink
Add -mwindows to linker flags to avoid opening console window on MinGW
Browse files Browse the repository at this point in the history
  • Loading branch information
emlai committed Oct 11, 2016
1 parent 429d5c0 commit 8dbdccd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Expand Up @@ -7,6 +7,9 @@ if(NOT MINGW)
else()
# Workaround for http://stackoverflow.com/q/38538924/3425536
set(CMAKE_CXX_FLAGS -std=gnu++11 ${CMAKE_CXX_FLAGS})
# Add -mwindows to the linker flags to avoid opening a console window when the
# program is started (see https://cygwin.com/ml/cygwin/2007-04/msg00027.html)
set(CMAKE_EXE_LINKER_FLAGS -mwindows)
endif()

# dependencies ###########################################################################
Expand Down

0 comments on commit 8dbdccd

Please sign in to comment.