Differenced the compiler options on Windows and Linux, making a ton of stupid MSVC compiler warnings go away.

p4#: 21138
This commit is contained in:
Jacob Støren 2013-04-05 10:42:53 +02:00
parent ca63b9163a
commit db62f01e0a

View File

@ -19,13 +19,15 @@ ENABLE_TESTING()
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(ERT_LINUX TRUE ) set(ERT_LINUX TRUE )
add_definitions( -DERT_LINUX ) add_definitions( -DERT_LINUX )
set( CMAKE_C_FLAGS "-g -O2 -Wall -std=gnu99" )
set( CMAKE_CXX_FLAGS "-g -O2 -Wall" )
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set(ERT_WINDOWS TRUE) set(ERT_WINDOWS TRUE)
add_definitions( -DERT_WINDOWS ) add_definitions( -DERT_WINDOWS )
set( CMAKE_C_FLAGS "-O2" )
set( CMAKE_CXX_FLAGS "-O2" )
endif() endif()
set( CMAKE_C_FLAGS "-g -O2 -Wall -std=gnu99" )
set( CMAKE_CXX_FLAGS "-g -O2 -Wall" )
include(cmake/ert_check.cmake) include(cmake/ert_check.cmake)
include(cmake/ert_find.cmake) include(cmake/ert_find.cmake)