[clfft] 37/64: fixing VS12 builds

Jérôme Kieffer kieffer-guest at moszumanska.debian.org
Wed May 20 07:33:35 UTC 2015


This is an automated email from the git hooks/post-receive script.

kieffer-guest pushed a commit to branch develop
in repository clfft.

commit 578e695b7d268396e49da4cff5b4b3ea280f46a1
Author: bragadeesh <bragadeesh.natarajan at amd>
Date:   Thu Mar 12 17:51:12 2015 -0500

    fixing VS12 builds
---
 src/examples/CMakeLists.txt |  8 ++++++++
 src/gtest.cmake             | 18 ++++++++++++++----
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/src/examples/CMakeLists.txt b/src/examples/CMakeLists.txt
index 5655e5d..b4c4b6b 100644
--- a/src/examples/CMakeLists.txt
+++ b/src/examples/CMakeLists.txt
@@ -26,6 +26,14 @@ LINK_DIRECTORIES("${PROJECT_BINARY_DIR}/package/lib${SUFFIX_LIB}")
 FILE(GLOB FILES "*.c")
 
 FOREACH(FILE ${FILES})
+
+    if( MSVC )
+    	if( MSVC_VERSION LESS 1800 )
+    		# Use C++ with Microsoft compiler
+    		SET_SOURCE_FILES_PROPERTIES( ${FILE} PROPERTIES LANGUAGE CXX)
+    	endif ()
+    endif( )
+
     GET_FILENAME_COMPONENT(EXAMPLE ${FILE} NAME_WE)
     GET_FILENAME_COMPONENT(FULL_DIR_NAME ${FILE} PATH)
     GET_FILENAME_COMPONENT(DIR_NAME ${FULL_DIR_NAME} NAME)
diff --git a/src/gtest.cmake b/src/gtest.cmake
index 451e885..3661721 100644
--- a/src/gtest.cmake
+++ b/src/gtest.cmake
@@ -28,6 +28,16 @@ else()
     list(APPEND byproducts ${${lib}_location})
   endforeach()
 
+  if( MSVC )
+	if( MSVC_VERSION LESS 1800 )  
+      set(EXTRA_FLAG "/D_VARIADIC_MAX=10 ")
+	else()
+	  set(EXTRA_FLAG "")
+	endif()
+  else()
+    set(EXTRA_FLAG "")
+  endif()
+  
   ExternalProject_Add(
     gtest-external
     URL http://googletest.googlecode.com/files/gtest-1.7.0.zip
@@ -37,10 +47,10 @@ else()
     CMAKE_CACHE_ARGS
       -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
       -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
-      -DCMAKE_CXX_FLAGS_DEBUG:STRING=${CMAKE_CXX_FLAGS_DEBUG}
-      -DCMAKE_CXX_FLAGS_MINSIZEREL:STRING=${CMAKE_CXX_FLAGS_MINSIZEREL}
-      -DCMAKE_CXX_FLAGS_RELEASE:STRING=${CMAKE_CXX_FLAGS_RELEASE}
-      -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
+      -DCMAKE_CXX_FLAGS_DEBUG:STRING=${EXTRA_FLAG}${CMAKE_CXX_FLAGS_DEBUG}
+      -DCMAKE_CXX_FLAGS_MINSIZEREL:STRING=${EXTRA_FLAG}${CMAKE_CXX_FLAGS_MINSIZEREL}
+      -DCMAKE_CXX_FLAGS_RELEASE:STRING=${EXTRA_FLAG}${CMAKE_CXX_FLAGS_RELEASE}
+      -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=${EXTRA_FLAG}${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
       -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
       -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
       -DCMAKE_C_FLAGS_DEBUG:STRING=${CMAKE_C_FLAGS_DEBUG}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/clfft.git



More information about the debian-science-commits mailing list