File tree 1 file changed +19
-4
lines changed 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change 22
22
# cd build_directory
23
23
# cmakerelease ..
24
24
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
+
25
35
# Recent version of CMake required
26
36
cmake_minimum_required (VERSION 3.1.0 FATAL_ERROR)
27
37
@@ -60,10 +70,15 @@ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
60
70
# MinSizeRel
61
71
set (CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} " )
62
72
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
+
67
82
68
83
69
84
# Include directories
You can’t perform that action at this time.
0 commit comments