Move msvc compiler options to OptiomalOptions.cmake
This commit is contained in:
parent
e7aca55ba3
commit
b2a0160508
@ -11,23 +11,6 @@ IF(WIN32)
|
|||||||
SET(CMAKE_LIBRARY_PATH "${GNUWIN32}/lib")
|
SET(CMAKE_LIBRARY_PATH "${GNUWIN32}/lib")
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
IF(MSVC)
|
|
||||||
# @@ Some of these might only be available in VC8.
|
|
||||||
# Code generation flags.
|
|
||||||
# SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /arch:SSE2 /fp:fast")
|
|
||||||
# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2 /fp:fast")
|
|
||||||
|
|
||||||
# Optimization flags.
|
|
||||||
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} /O2 /Ob2 /Oi /Ot /Oy /GL")
|
|
||||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} /O2 /Ob2 /Oi /Ot /Oy /GL")
|
|
||||||
SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG")
|
|
||||||
SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG")
|
|
||||||
SET(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /LTCG")
|
|
||||||
|
|
||||||
# Definitions.
|
|
||||||
ADD_DEFINITIONS(-D__SSE2__ -D__SSE__ -D__MMX__)
|
|
||||||
ENDIF(MSVC)
|
|
||||||
|
|
||||||
INCLUDE(${NV_CMAKE_DIR}/OptimalOptions.cmake)
|
INCLUDE(${NV_CMAKE_DIR}/OptimalOptions.cmake)
|
||||||
MESSAGE(STATUS "Setting optimal options")
|
MESSAGE(STATUS "Setting optimal options")
|
||||||
MESSAGE(STATUS " Processor: ${NV_SYSTEM_PROCESSOR}")
|
MESSAGE(STATUS " Processor: ${NV_SYSTEM_PROCESSOR}")
|
||||||
|
@ -39,9 +39,9 @@ ELSE (WIN32)
|
|||||||
ENDIF (WIN32)
|
ENDIF (WIN32)
|
||||||
|
|
||||||
IF (GLEW_INCLUDE_PATH)
|
IF (GLEW_INCLUDE_PATH)
|
||||||
SET( GLEW_FOUND 1 CACHE STRING "Set to 1 if GLEW is found, 0 otherwise")
|
SET( GLEW_FOUND 1 CACHE STRING "Set to 1 if GLEW is found, 0 otherwise")
|
||||||
ELSE (GLEW_INCLUDE_PATH)
|
ELSE (GLEW_INCLUDE_PATH)
|
||||||
SET( GLEW_FOUND 0 CACHE STRING "Set to 1 if GLEW is found, 0 otherwise")
|
SET( GLEW_FOUND 0 CACHE STRING "Set to 1 if GLEW is found, 0 otherwise")
|
||||||
ENDIF (GLEW_INCLUDE_PATH)
|
ENDIF (GLEW_INCLUDE_PATH)
|
||||||
|
|
||||||
MARK_AS_ADVANCED( GLEW_FOUND )
|
MARK_AS_ADVANCED( GLEW_FOUND )
|
||||||
|
@ -28,4 +28,19 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
|
|||||||
|
|
||||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
|
||||||
|
IF(MSVC)
|
||||||
|
# @@ Some of these might only be available in VC8.
|
||||||
|
# Code generation flags.
|
||||||
|
# SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /arch:SSE2 /fp:fast")
|
||||||
|
# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2 /fp:fast")
|
||||||
|
|
||||||
|
# Optimization flags.
|
||||||
|
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} /O2 /Ob2 /Oi /Ot /Oy /GL")
|
||||||
|
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} /O2 /Ob2 /Oi /Ot /Oy /GL")
|
||||||
|
SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG")
|
||||||
|
SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG")
|
||||||
|
SET(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /LTCG")
|
||||||
|
|
||||||
|
# Definitions.
|
||||||
|
ADD_DEFINITIONS(-D__SSE2__ -D__SSE__ -D__MMX__)
|
||||||
|
ENDIF(MSVC)
|
||||||
|
Loading…
Reference in New Issue
Block a user