Skip to content

Commit 952306c

Browse files
committed
Fixing up the compiler options for Windows.
1 parent bba6501 commit 952306c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ set (munkres-cpp_VERSION_MAJOR 2)
55
set (munkres-cpp_VERSION_MINOR 0)
66

77
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
8-
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
8+
# https://stackoverflow.com/questions/2274006/cmake-invalid-numeric-argument-wextra
9+
if(CMAKE_COMPILER_IS_GNUCXX)
10+
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
11+
endif(CMAKE_COMPILER_IS_GNUCXX)
912
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -O0 -ggdb3 -DDEBUG")
1013
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O3")
1114

0 commit comments

Comments
 (0)