# Set Compiler flags if (NOT WIN32) set (CMAKE_CXX_FLAGS "-fPIC ${USERDEFINED_CXX_FLAGS}") set (CMAKE_CXX_FLAGS_PROFILE "-O3 -g -DNDEBUG -fPIC ${USERDEFINED_CXX_FLAGS}") set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG -fPIC ${USERDEFINED_CXX_FLAGS}") else (NOT WIN32) if (UNIX) #mingw, cygwin etc. message (FATAL_ERROR "Found unsupported operating system: Only Windows and Linux systems are supported!") else (UNIX) #pure win32 if (MSVC70 OR MSVC71) set (CMAKE_CXX_FLAGS "/D _WIN32 /D _WINSOCKAPI_ /Gy /GR /EHsc /W1 /nologo /c /TP /wd4005 /wd4103") set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "") set (CMAKE_CXX_FLAGS_DEBUG "/Od /ZI /D DEBUG /MDd /Gm /RTC1 /RTCc") set (CMAKE_CXX_FLAGS_RELEASE "/Ob2 /Oi /Ot /D NDEBUG /GL /MD") elseif (MSVC90) set (CMAKE_CXX_FLAGS "/D _WIN32 /D _WINSOCKAPI_ /MP /Gy /EHsc /W1 /nologo /c /TP /wd4005 /wd4103") set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "") set (CMAKE_CXX_FLAGS_DEBUG "/Od /ZI /D DEBUG /MDd /RTC1 /RTCc /fp:except") set (CMAKE_CXX_FLAGS_RELEASE "/Ob2 /Oi /Ot /D NDEBUG /GL /MD /fp:fast") else (MSVC70 OR MSVC71) set (CMAKE_CXX_FLAGS "/D _WIN32 /D _WINSOCKAPI_ /MP /Gy /EHsc /W1 /nologo /c /TP /wd4005 /wd4103") set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "") set (CMAKE_CXX_FLAGS_DEBUG "/Od /ZI /D DEBUG /MDd /Gm /RTC1 /RTCc /fp:except") set (CMAKE_CXX_FLAGS_RELEASE "/Ob2 /Oi /Ot /D NDEBUG /GL /MD /fp:fast") endif (MSVC70 OR MSVC71) endif (UNIX) endif (NOT WIN32)