Match RelWithDebInfo for MSVC builds (#85)
Update build scripts to set the correct flags for the RelWithDebInfo build.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ca16372..b7c9155 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -87,8 +87,13 @@
# /MT* options. For debug builds use /MTd, and for release builds use /MT.
if(CMAKE_BUILD_TYPE MATCHES "Debug")
set(CUSTOM_CXX_FLAGS ${CUSTOM_CXX_FLAGS} /MTd)
+ message(STATUS "Setting /MTd")
+ elseif(CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo")
+ set(CUSTOM_CXX_FLAGS ${CUSTOM_CXX_FLAGS} /MT)
+ message(STATUS "Setting /MT")
else()
set(CUSTOM_CXX_FLAGS ${CUSTOM_CXX_FLAGS} /MT)
+ message(STATUS "Setting /MT")
endif()
set(CUSTOM_CXX_FLAGS
diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
index 1b7e2f5..886d357 100644
--- a/third_party/CMakeLists.txt
+++ b/third_party/CMakeLists.txt
@@ -12,12 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-if(WIN32)
- option(g_force_shared_crt
- "Use shared (DLL) run-time lib even when Google Test is built as static lib."
- ON)
-endif()
-
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# Turn off warnings to make gtest happy
set(GTEST_BUILD_FIXES
@@ -252,6 +246,7 @@
# Tell Glslang to statically link the C Runtime library.
set(LLVM_USE_CRT_DEBUG MTd)
set(LLVM_USE_CRT_RELEASE MT)
+set(LLVM_USE_CRT_RELWITHDEBINFO MT)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/glslang)
set(CMAKE_CXX_FLAGS ${CXX_BACK})