Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
c285b600
Commit
c285b600
authored
Jan 13, 2014
by
peastman
Browse files
Detect Visual Studio in a way that works correctly with NMake files
parent
19dd114e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
CMakeLists.txt
CMakeLists.txt
+5
-5
No files found.
CMakeLists.txt
View file @
c285b600
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment