[CMAKE]
authorSylvain Petreolle <spetreolle@yahoo.fr>
Mon, 5 Sep 2011 12:41:18 +0000 (12:41 +0000)
committerSylvain Petreolle <spetreolle@yahoo.fr>
Mon, 5 Sep 2011 12:41:18 +0000 (12:41 +0000)
Don't assume CMAKE_SHARED_LIBRARY_ASM_FLAGS exists.

svn path=/trunk/; revision=53597

reactos/cmake/gcc.cmake

index d134b37..3c7be0f 100644 (file)
@@ -9,7 +9,9 @@ add_compile_flags("-gdwarf-2 -g2 -femit-struct-debug-detailed=none -feliminate-u
 add_compile_flags("-Werror")
 
 # For some reason, cmake sets -fPIC, and we don't want it
-string(REPLACE "-fPIC" "" CMAKE_SHARED_LIBRARY_ASM_FLAGS ${CMAKE_SHARED_LIBRARY_ASM_FLAGS})
+if(DEFINED CMAKE_SHARED_LIBRARY_ASM_FLAGS)
+    string(REPLACE "-fPIC" "" CMAKE_SHARED_LIBRARY_ASM_FLAGS ${CMAKE_SHARED_LIBRARY_ASM_FLAGS})
+endif()
 
 # Tuning
 if(ARCH MATCHES i386)