Commit c285b600 authored by peastman's avatar peastman
Browse files

Detect Visual Studio in a way that works correctly with NMake files

parent 19dd114e
...@@ -162,11 +162,11 @@ ADD_DEFINITIONS(-DOPENMM_LIBRARY_NAME=${OPENMM_LIBRARY_NAME} ...@@ -162,11 +162,11 @@ ADD_DEFINITIONS(-DOPENMM_LIBRARY_NAME=${OPENMM_LIBRARY_NAME}
# to add them ourselves for Linux or Cygwin. Two cases to avoid duplicate quotes # to add them ourselves for Linux or Cygwin. Two cases to avoid duplicate quotes
# in Visual Studio which end up in the binary. # in Visual Studio which end up in the binary.
IF (${CMAKE_GENERATOR} MATCHES "Visual Studio") IF (MSVC)
SET(NEED_QUOTES FALSE) SET(NEED_QUOTES FALSE)
ELSE (${CMAKE_GENERATOR} MATCHES "Visual Studio") ELSE (MSVC)
SET(NEED_QUOTES TRUE) SET(NEED_QUOTES TRUE)
ENDIF (${CMAKE_GENERATOR} MATCHES "Visual Studio") ENDIF (MSVC)
##TODO: doesn't work without quotes in nightly build ##TODO: doesn't work without quotes in nightly build
SET(NEED_QUOTES TRUE) SET(NEED_QUOTES TRUE)
...@@ -208,9 +208,9 @@ SET(${PROJECT_NAME}_LIBRARY_DIR ${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}) ...@@ -208,9 +208,9 @@ SET(${PROJECT_NAME}_LIBRARY_DIR ${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR})
# Ensure that debug libraries have "_d" appended to their names. # Ensure that debug libraries have "_d" appended to their names.
# CMake gets this right on Windows automatically with this definition. # CMake gets this right on Windows automatically with this definition.
IF (${CMAKE_GENERATOR} MATCHES "Visual Studio") IF (MSVC)
SET(CMAKE_DEBUG_POSTFIX "_d" CACHE INTERNAL "" FORCE) SET(CMAKE_DEBUG_POSTFIX "_d" CACHE INTERNAL "" FORCE)
ENDIF (${CMAKE_GENERATOR} MATCHES "Visual Studio") ENDIF (MSVC)
# But on Unix or Cygwin we have to add the suffix manually # But on Unix or Cygwin we have to add the suffix manually
IF (UNIX AND CMAKE_BUILD_TYPE MATCHES Debug) IF (UNIX AND CMAKE_BUILD_TYPE MATCHES Debug)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment