Browse Source

allow compiling with gcc

fix install target
Carsten Teibes 11 years ago
parent
commit
08254db5f7
2 changed files with 12 additions and 8 deletions
  1. 11
    7
      CMakeLists.txt
  2. 1
    1
      src/CMakeLists.txt

+ 11
- 7
CMakeLists.txt View File

31
 #################################################################
31
 #################################################################
32
 
32
 
33
 # Build warnings
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
 # Flags for all builds
46
 # Flags for all builds
43
 set (OpenRaider_CXX_FLAGS "${OpenRaider_CXX_FLAGS} -std=c++11 ${WARNINGS}")
47
 set (OpenRaider_CXX_FLAGS "${OpenRaider_CXX_FLAGS} -std=c++11 ${WARNINGS}")

+ 1
- 1
src/CMakeLists.txt View File

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

Loading…
Cancel
Save