fix launching on windows
authorkoda
Wed, 12 Jun 2013 19:15:51 +0200
changeset 9191 fc54667b1203
parent 9189 b0d16164dfa0
child 9193 1394137589e4
child 9219 0a4b6bb69f99
fix launching on windows
cmake_modules/compilerchecks.cmake
cmake_modules/platform.cmake
--- a/cmake_modules/compilerchecks.cmake	Wed Jun 12 04:58:27 2013 +0300
+++ b/cmake_modules/compilerchecks.cmake	Wed Jun 12 19:15:51 2013 +0200
@@ -9,9 +9,11 @@
 
 #TODO: should there be two different checks for C and CXX?
 
-#stack protection, when found it needs to go in the linker flags too (-lssp is added)
+#stack protection, when found it needs to go in the linker flags too
+#it is disabled on win32 because it adds a dll and messes with linker
+#(see 822312 654424 on bugzilla.redhat.com)
 check_c_compiler_flag("-fstack-protector-all -fstack-protector" HAVE_STACKPROTECTOR)
-if(HAVE_STACKPROTECTOR)
+if(HAVE_STACKPROTECTOR AND (NOT WIN32))
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-all -fstack-protector")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-all -fstack-protector")
     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fstack-protector-all -fstack-protector")
--- a/cmake_modules/platform.cmake	Wed Jun 12 04:58:27 2013 +0300
+++ b/cmake_modules/platform.cmake	Wed Jun 12 19:15:51 2013 +0200
@@ -73,8 +73,8 @@
 
 endif(APPLE)
 
-if(WINDOWS)
+if(WIN32)
     #this flags prevents a few dll hell problems
     set(CMAKE_C_FLAGS "-static-libgcc ${CMAKE_C_FLAGS}")
-endif(WINDOWS)
+endif(WIN32)