File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change 2222# cd build_directory
2323# cmakerelease ..
2424
25+ # To build with Visual Studio (use cmake or cmake.exe or path/cmake.exe depending of your configuration)
26+ # mkdir build_directory
27+ # cd build_directory
28+ # cmake .. -G "Visual Studio 10 Win64"
29+ # cmake.exe .. -G "Visual Studio 11 2012"
30+ # cmake.exe .. -G "Visual Studio 12 2013"
31+ # cmake.exe .. -G "Visual Studio 13 2014"
32+ # cmake.exe .. -G "Visual Studio 14 2015"
33+
34+
2535# Recent version of CMake required
2636cmake_minimum_required (VERSION 3.1.0 FATAL_ERROR)
2737
@@ -60,10 +70,15 @@ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
6070# MinSizeRel
6171set (CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} " )
6272
63- # Basic options for all builds
64- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Wshadow" )
65- # Might need to be fixed for retrocompatibility or temporary
66- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++0x-compat -Wno-unused" )
73+ # Set default compile flags for GCC
74+ if (CMAKE_COMPILER_IS_GNUCXX)
75+ message (STATUS "GCC detected, adding compile flags" )
76+ # Basic options for all builds
77+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Wshadow" )
78+ # Might need to be fixed for retrocompatibility or temporary
79+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++0x-compat -Wno-unused" )
80+ endif (CMAKE_COMPILER_IS_GNUCXX)
81+
6782
6883
6984# Include directories
You can’t perform that action at this time.
0 commit comments