Do not use -fvisibility option with Visual C
authorMichael Kruse <llvm@meinersbur.de>
Fri, 7 Aug 2015 22:16:44 +0000 (22:16 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Fri, 7 Aug 2015 22:16:44 +0000 (22:16 +0000)
It doesn't know the option and prints a warning.

llvm-svn: 244363

polly/CMakeLists.txt

index 078090b..db6524b 100644 (file)
@@ -93,7 +93,9 @@ endif ()
 #
 # We also disable all warnings, as these should be fixed upstream. There is
 # no value in reporting them here.
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -w")
+if (NOT MSVC)
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -w")
+endif ()
 
 # Add path for custom modules
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${POLLY_SOURCE_DIR}/cmake")