From c8c5bb4e22acae159d495c367656c95048a539ad Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Wed, 18 Aug 2004 09:28:41 -0400 Subject: [PATCH] BUG: Unly set gcc flags for C compiler if CMAKE_COMPILER_IS_GNUCC is set --- Modules/CMakeSystemSpecificInformation.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Modules/CMakeSystemSpecificInformation.cmake b/Modules/CMakeSystemSpecificInformation.cmake index 2c88fa580..bdc3fe066 100644 --- a/Modules/CMakeSystemSpecificInformation.cmake +++ b/Modules/CMakeSystemSpecificInformation.cmake @@ -28,8 +28,10 @@ SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "") # -rpath SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP "") # : or empty SET(CMAKE_LIBRARY_PATH_FLAG "-L") SET(CMAKE_LINK_LIBRARY_FLAG "-l") -IF(CMAKE_COMPILER_IS_GNUCXX) +IF(CMAKE_COMPILER_IS_GNUCC) SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic +ENDIF(CMAKE_COMPILER_IS_GNUCC) +IF(CMAKE_COMPILER_IS_GNUCXX) SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic ENDIF(CMAKE_COMPILER_IS_GNUCXX)