File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,8 @@ set(FLANN_VERSION 1.8.4)
12
12
DISSECT_VERSION ()
13
13
GET_OS_INFO ()
14
14
15
- # CMAKE_C_COMPILER_ID and CMAKE_CXX_COMPILER_ID are documented as internal variables subject to
16
- # change at: http://www.cmake.org/cmake/help/v2.8.8/cmake.html#variable:CMAKE_LANG_COMPILER_ID
17
- # however currently this seems the most robust way to detect the presence of the Clang compiler
15
+
16
+ # detect if using the Clang compiler
18
17
if ("${CMAKE_C_COMPILER_ID} " MATCHES "Clang" )
19
18
set (CMAKE_COMPILER_IS_CLANG 1 )
20
19
endif ()
@@ -146,12 +145,12 @@ include_directories(BEFORE ${PROJECT_SOURCE_DIR}/src/cpp)
146
145
# require proper c++
147
146
#add_definitions( "-Wall -ansi -pedantic" )
148
147
# HDF5 uses long long which is not ansi
149
- if ( WIN32 )
148
+ if ( " ${CMAKE_C_COMPILER_ID} " MATCHES "MSVC" OR " ${CMAKE_CXX_COMPILER_ID} " MATCHES "MSVC" )
150
149
# lots of warnings with cl.exe right now, use /W1
151
150
add_definitions ("/W1 -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS /bigobj" )
152
- else (WIN32 )
151
+ else ()
153
152
add_definitions ( "-Wall -Wno-unknown-pragmas -Wno-unused-function" )
154
- endif (WIN32 )
153
+ endif ()
155
154
156
155
add_subdirectory ( cmake )
157
156
add_subdirectory ( src )
You can’t perform that action at this time.
0 commit comments