Przeglądaj źródła

fix bug on mac if COMPILE FLAGS are not set then you end up with NOTFOUND as a compile flag.

Bill Hoffman 21 lat temu
rodzic
commit
b17c6ac905
1 zmienionych plików z 6 dodań i 1 usunięć
  1. 6 1
      Source/CTest/Curl/CMakeLists.txt

+ 6 - 1
Source/CTest/Curl/CMakeLists.txt

@@ -417,8 +417,13 @@ ENDIF(RETSIGTYPE_TEST)
 IF(CMAKE_COMPILER_IS_GNUCC AND APPLE)
   # The Mac version of GCC warns about use of long double.  Disable it.
   GET_SOURCE_FILE_PROPERTY(MPRINTF_COMPILE_FLAGS mprintf.c COMPILE_FLAGS)
+  IF(MPRINTF_COMPILE_FLAGS)
+    SET(MPRINTF_COMPILE_FLAGS "${MPRINTF_COMPILE_FLAGS} -Wno-long-double")
+  ELSE(MPRINTF_COMPILE_FLAGS)
+    SET(MPRINTF_COMPILE_FLAGS "-Wno-long-double")
+  ENDIF(MPRINTF_COMPILE_FLAGS)
   SET_SOURCE_FILES_PROPERTIES(mprintf.c PROPERTIES
-    COMPILE_FLAGS "${MPRINTF_COMPILE_FLAGS} -Wno-long-double")
+    COMPILE_FLAGS ${MPRINTF_COMPILE_FLAGS})
 ENDIF(CMAKE_COMPILER_IS_GNUCC AND APPLE)
 
 # The rest of the build