From 44d4ca5898e5438ee2af9e2190beba6c73cf007f Mon Sep 17 00:00:00 2001 From: keineahnung2345 Date: Thu, 29 Oct 2020 13:37:30 +0800 Subject: [PATCH] Make it work on Windows --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ee342ab..865cad5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,11 @@ include_directories(${EIGEN3_INCLUDE_DIR}) include_directories(${NANOFLANN_INCLUDE_DIR}) include_directories(${CMAKE_SOURCE_DIR}) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pedantic -Wall -Wextra -Wfatal-errors") +IF(CMAKE_COMPILER_IS_GNUCXX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pedantic -Wall -Wextra -Wfatal-errors") +ELSE() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pedantic -Wall") +ENDIF() ENABLE_TESTING()