From 6a38eb3fc5c90773e3895ba0a169c56dba639a29 Mon Sep 17 00:00:00 2001 From: Tan Li Boon Date: Mon, 7 Nov 2016 01:42:20 +0800 Subject: [PATCH] Resolve issue #99: - Used cmake regex to strip out the /RTC1 flag used by MSVC debug builds, which conflicts with the -nodefaultlib and -noentry flags. --- build/cmake/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt index 9130e00..430647c 100644 --- a/build/cmake/CMakeLists.txt +++ b/build/cmake/CMakeLists.txt @@ -101,6 +101,7 @@ if (MSVC) target_compile_options (glew_s PRIVATE -GS-) # remove stdlib dependency target_link_libraries (glew LINK_PRIVATE -nodefaultlib -noentry) + string(REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) elseif (WIN32 AND ((CMAKE_C_COMPILER_ID MATCHES "GNU") OR (CMAKE_C_COMPILER_ID MATCHES "Clang"))) # remove stdlib dependency on windows with GCC and Clang (for similar reasons # as to MSVC - to allow it to be used with any Windows compiler)