[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [smokegen] /: Added -mstackrealign on Windows only when the compiler is GNU.
From:       Arno Rehn <arno () arnorehn ! de>
Date:       2012-11-28 19:18:02
Message-ID: 20121128191802.B1127A6091 () git ! kde ! org
[Download RAW message or body]

Git commit 11a0076dfe4e5b65594739e537e2a3a0173ac436 by Arno Rehn, on behalf=
 of Dimitar Dobrev.
Committed on 21/11/2012 at 19:40.
Pushed by arnorehn into branch 'master'.

Added -mstackrealign on Windows only when the compiler is GNU.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>

M  +4    -2    CMakeLists.txt
M  +3    -1    deptool/CMakeLists.txt
M  +3    -1    generators/dump/CMakeLists.txt
M  +3    -1    generators/smoke/CMakeLists.txt
M  +3    -1    parser/CMakeLists.txt
M  +3    -1    parser/rpp/CMakeLists.txt
M  +3    -1    parser/rpp/tests/CMakeLists.txt
M  +6    -3    parser/tests/CMakeLists.txt
M  +3    -1    smokeapi/CMakeLists.txt
M  +3    -1    smokebase/CMakeLists.txt

http://commits.kde.org/smokegen/11a0076dfe4e5b65594739e537e2a3a0173ac436

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d907f44..c54f090 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,8 +46,10 @@ install(TARGETS smokegen LIBRARY DESTINATION ${LIB_INSTA=
LL_DIR}
     ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
     RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
 if (WIN32)
-	# Realign the stack, for compatibility with an older ABI.
-	set_target_properties(smokegen PROPERTIES COMPILE_FLAGS -mstackrealign)
+	# Realign the stack, for compatibility with an older ABI
+	if(CMAKE_COMPILER_IS_GNUCXX)
+		set_target_properties(smokegen PROPERTIES COMPILE_FLAGS -mstackrealign)
+	endif()
 =

     # Get rid of the "lib" prefix on archives/DLLs in Windows.
     set_target_properties(smokegen PROPERTIES PREFIX "" IMPORT_PREFIX "")
diff --git a/deptool/CMakeLists.txt b/deptool/CMakeLists.txt
index cb1bca2..756463e 100644
--- a/deptool/CMakeLists.txt
+++ b/deptool/CMakeLists.txt
@@ -8,5 +8,7 @@ target_link_libraries(smokedeptool smokebase ${QT_QTCORE_LI=
BRARY})
 =

 if (WIN32)
 	# Realign the stack, for compatibility with an older ABI.
-	set_target_properties (smokedeptool PROPERTIES COMPILE_FLAGS -mstackreali=
gn)
+	if(CMAKE_COMPILER_IS_GNUCXX)
+		set_target_properties(smokedeptool PROPERTIES COMPILE_FLAGS -mstackreali=
gn)
+	endif()
 endif (WIN32)
diff --git a/generators/dump/CMakeLists.txt b/generators/dump/CMakeLists.txt
index 8b41d19..00f6591 100644
--- a/generators/dump/CMakeLists.txt
+++ b/generators/dump/CMakeLists.txt
@@ -9,7 +9,9 @@ set_target_properties(generator_dump PROPERTIES PREFIX "")
 =

 if (WIN32)
 	# Realign the stack, for compatibility with an older ABI.
-	set_target_properties (generator_dump PROPERTIES COMPILE_FLAGS -mstackrea=
lign)
+	if(CMAKE_COMPILER_IS_GNUCXX)
+		set_target_properties(generator_dump PROPERTIES COMPILE_FLAGS -mstackrea=
lign)
+	endif()
 endif (WIN32)
 =

 install(TARGETS generator_dump LIBRARY DESTINATION ${LIB_INSTALL_DIR}/smok=
egen)
diff --git a/generators/smoke/CMakeLists.txt b/generators/smoke/CMakeLists.=
txt
index 1b718c6..a49573a 100644
--- a/generators/smoke/CMakeLists.txt
+++ b/generators/smoke/CMakeLists.txt
@@ -12,7 +12,9 @@ set_target_properties(generator_smoke PROPERTIES PREFIX "=
")
 =

 if (WIN32)
 	# Realign the stack, for compatibility with an older ABI.
-	set_target_properties (generator_smoke PROPERTIES COMPILE_FLAGS -mstackre=
align)
+	if(CMAKE_COMPILER_IS_GNUCXX)
+		set_target_properties(generator_smoke PROPERTIES COMPILE_FLAGS -mstackre=
align)
+	endif()
 endif (WIN32)
 =

 install(TARGETS generator_smoke LIBRARY DESTINATION ${LIB_INSTALL_DIR}/smo=
kegen/)
diff --git a/parser/CMakeLists.txt b/parser/CMakeLists.txt
index 9c221ae..9e61f97 100644
--- a/parser/CMakeLists.txt
+++ b/parser/CMakeLists.txt
@@ -43,7 +43,9 @@ install(TARGETS cppparser LIBRARY DESTINATION ${LIB_INSTA=
LL_DIR}
     RUNTIME DESTINATION bin)
 if (WIN32)
 	# Realign the stack, for compatibility with an older ABI.
-	set_target_properties (cppparser PROPERTIES COMPILE_FLAGS -mstackrealign)
+	if(CMAKE_COMPILER_IS_GNUCXX)
+		set_target_properties(cppparser PROPERTIES COMPILE_FLAGS -mstackrealign)
+	endif()
 =

     # Get rid of the "lib" prefix on archives/DLLs in Windows.
     set_target_properties(cppparser PROPERTIES PREFIX "" IMPORT_PREFIX "")
diff --git a/parser/rpp/CMakeLists.txt b/parser/rpp/CMakeLists.txt
index 3724c9c..2475906 100644
--- a/parser/rpp/CMakeLists.txt
+++ b/parser/rpp/CMakeLists.txt
@@ -25,7 +25,9 @@ target_link_libraries(kdev4cpprpp ${KDE4_KDECORE_LIBS} ${=
KDEVPLATFORM_LANGUAGE_L
 =

 if (WIN32)
 	# Realign the stack, for compatibility with an older ABI.
-	set_target_properties (kdev4cpprpp PROPERTIES COMPILE_FLAGS -mstackrealig=
n)
+	if(CMAKE_COMPILER_IS_GNUCXX)
+		set_target_properties(kdev4cpprpp PROPERTIES COMPILE_FLAGS -mstackrealig=
n)
+	endif()
 endif (WIN32)
 =

 install(TARGETS kdev4cpprpp ${INSTALL_TARGETS_DEFAULT_ARGS} )
diff --git a/parser/rpp/tests/CMakeLists.txt b/parser/rpp/tests/CMakeLists.=
txt
index 7515e7c..106fcca 100644
--- a/parser/rpp/tests/CMakeLists.txt
+++ b/parser/rpp/tests/CMakeLists.txt
@@ -13,5 +13,7 @@ target_link_libraries(pp ${KDE4_KDECORE_LIBS} kdev4cpprpp)
 =

 if (WIN32)
 	# Realign the stack, for compatibility with an older ABI.
-	set_target_properties (pp PROPERTIES COMPILE_FLAGS -mstackrealign)
+	if(CMAKE_COMPILER_IS_GNUCXX)
+		set_target_properties(pp PROPERTIES COMPILE_FLAGS -mstackrealign)
+	endif()
 endif (WIN32)
diff --git a/parser/tests/CMakeLists.txt b/parser/tests/CMakeLists.txt
index 6e6aba5..9a88f26 100644
--- a/parser/tests/CMakeLists.txt
+++ b/parser/tests/CMakeLists.txt
@@ -14,7 +14,9 @@ add_executable(parsertest ${parsertest_SRCS} test_parser.=
moc)
 =

 if (WIN32)
 	# Realign the stack, for compatibility with an older ABI.
-	set_target_properties (parsertest PROPERTIES COMPILE_FLAGS -mstackrealign)
+	if(CMAKE_COMPILER_IS_GNUCXX)
+		set_target_properties(parsertest PROPERTIES COMPILE_FLAGS -mstackrealign)
+	endif()
 endif (WIN32)
 =

 target_link_libraries(parsertest ${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY}=
 cppparser)
@@ -39,8 +41,9 @@ set(pooltest_SRCS test_pool.cpp)
 QT4_GENERATE_MOC(test_pool.h test_pool.moc)
 add_executable(pooltest ${pooltest_SRCS} test_pool.moc)
 if (WIN32)
-	# Realign the stack, for compatibility with an older ABI.
-	set_target_properties (pooltest PROPERTIES COMPILE_FLAGS -mstackrealign)
+	if(CMAKE_COMPILER_IS_GNUCXX)
+		set_target_properties(pooltest PROPERTIES COMPILE_FLAGS -mstackrealign)
+	endif()
 endif (WIN32)
 =

 target_link_libraries(pooltest ${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY} c=
ppparser)
diff --git a/smokeapi/CMakeLists.txt b/smokeapi/CMakeLists.txt
index 398ea15..18a3e6b 100644
--- a/smokeapi/CMakeLists.txt
+++ b/smokeapi/CMakeLists.txt
@@ -7,7 +7,9 @@ add_executable(smokeapi main.cpp)
 =

 if (WIN32)
 	# Realign the stack, for compatibility with an older ABI.
-	set_target_properties (smokeapi PROPERTIES COMPILE_FLAGS -mstackrealign)
+	if(CMAKE_COMPILER_IS_GNUCXX)
+		set_target_properties(smokeapi PROPERTIES COMPILE_FLAGS -mstackrealign)
+	endif()
 endif (WIN32)
 =

 target_link_libraries(smokeapi smokebase ${QT_QTCORE_LIBRARY})
diff --git a/smokebase/CMakeLists.txt b/smokebase/CMakeLists.txt
index f1643fd..0681a97 100644
--- a/smokebase/CMakeLists.txt
+++ b/smokebase/CMakeLists.txt
@@ -23,7 +23,9 @@ install(TARGETS smokebase LIBRARY DESTINATION ${LIB_INSTA=
LL_DIR}
     RUNTIME DESTINATION bin)
 if (WIN32)
 	# Realign the stack, for compatibility with an older ABI.
-	set_target_properties (smokebase PROPERTIES COMPILE_FLAGS -mstackrealign)
+	if(CMAKE_COMPILER_IS_GNUCXX)
+		set_target_properties(smokebase PROPERTIES COMPILE_FLAGS -mstackrealign)
+	endif()
 =

     # Get rid of the "lib" prefix on archives/DLLs in Windows.
     set_target_properties(smokebase PROPERTIES PREFIX "" IMPORT_PREFIX "")

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic