Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhexane360 <colin@gilgenbach.net>2019-01-07 02:25:38 +0300
committerhexane360 <colin@gilgenbach.net>2019-01-08 02:59:09 +0300
commitb406eeb2409c836173e3ddbc171a6abd10781605 (patch)
tree0f5c92eabc8e133b2b173c04e5e22c1bd1c45b65 /CMakeLists.txt
parentbdf4d5f41fcdd090422ba2f3d2d500cf89ffd580 (diff)
Fixed several warnings on Linux
-isolated C++-only options on newer CMake -Removed warning for ignored-attributes on Clang and GCC
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 12 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 781dbd01a..6cc3b3a26 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -107,14 +107,17 @@ if (APPLE)
endif ()
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
- # Workaround for an old CMake, which does not understand CMAKE_CXX_STANDARD.
- add_compile_options(-std=c++11 -Wall -Wno-reorder)
find_package(PkgConfig REQUIRED)
+
+ if (CMAKE_VERSION VERSION_LESS "3.1")
+ # Workaround for an old CMake, which does not understand CMAKE_CXX_STANDARD.
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ endif()
endif()
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUXX)
# Adding -fext-numeric-literals to enable GCC extensions on definitions of quad float literals, which are required by Boost.
- add_compile_options(-fext-numeric-literals)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fext-numeric-literals" )
if (SLIC3R_SYNTAXONLY)
set(CMAKE_CXX_ARCHIVE_CREATE "true")
@@ -131,9 +134,15 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUXX)
endif()
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ add_compile_options(-Wall)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-reorder" )
+
# On GCC and Clang, no return from a non-void function is a warning only. Here, we make it an error.
add_compile_options(-Werror=return-type)
+ #removes LOTS of extraneous Eigen warnings
+ add_compile_options(-Wno-ignored-attributes)
+
if (SLIC3R_ASAN)
add_compile_options(-fsanitize=address -fno-omit-frame-pointer)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")