Kaynağa Gözat

allow compiling with gcc

fix install target
Carsten Teibes 10 yıl önce
ebeveyn
işleme
08254db5f7
2 değiştirilmiş dosya ile 12 ekleme ve 8 silme
  1. 11
    7
      CMakeLists.txt
  2. 1
    1
      src/CMakeLists.txt

+ 11
- 7
CMakeLists.txt Dosyayı Görüntüle

@@ -31,13 +31,17 @@ set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
31 31
 #################################################################
32 32
 
33 33
 # Build warnings
34
-set (WARNINGS "${WARNINGS} -Weverything -Wno-padded -Wno-packed")
35
-set (WARNINGS "${WARNINGS} -Wno-global-constructors -Wno-exit-time-destructors")
36
-set (WARNINGS "${WARNINGS} -Wno-documentation-unknown-command -Wno-c++98-compat-pedantic")
37
-set (WARNINGS "${WARNINGS} -Wno-missing-prototypes -Wno-missing-variable-declarations")
38
-set (WARNINGS "${WARNINGS} -Wno-disabled-macro-expansion")
39
-
40
-set (WARNINGS "${WARNINGS} -Wno-shorten-64-to-32 -Wno-sign-conversion")
34
+if("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
35
+    set (WARNINGS "${WARNINGS} -Weverything -Wno-padded -Wno-packed")
36
+    set (WARNINGS "${WARNINGS} -Wno-global-constructors -Wno-exit-time-destructors")
37
+    set (WARNINGS "${WARNINGS} -Wno-documentation-unknown-command -Wno-c++98-compat-pedantic")
38
+    set (WARNINGS "${WARNINGS} -Wno-missing-prototypes -Wno-missing-variable-declarations")
39
+    set (WARNINGS "${WARNINGS} -Wno-disabled-macro-expansion")
40
+
41
+    set (WARNINGS "${WARNINGS} -Wno-shorten-64-to-32 -Wno-sign-conversion")
42
+else()
43
+    set (WARNINGS "${WARNINGS} -Wall -Wextra -Wpedantic")
44
+endif()
41 45
 
42 46
 # Flags for all builds
43 47
 set (OpenRaider_CXX_FLAGS "${OpenRaider_CXX_FLAGS} -std=c++11 ${WARNINGS}")

+ 1
- 1
src/CMakeLists.txt Dosyayı Görüntüle

@@ -176,7 +176,7 @@ endif (APPLE)
176 176
 
177 177
 if (NOT APPLE)
178 178
     # Install binary
179
-    install (TARGET OpenRaider
179
+    install (TARGETS OpenRaider
180 180
         RUNTIME DESTINATION bin
181 181
     )
182 182
 endif (NOT APPLE)

Loading…
İptal
Kaydet