[clfft] 12/109: Fixed compiler name check on Linux

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


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

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

commit b43d7683e9d634739b35705a9f1d123a7ec0c1c7
Author: Pavan Yalamanchili <pavan at accelereyes.com>
Date:   Thu Sep 5 18:51:01 2013 -0400

    Fixed compiler name check on Linux
    
    - Default compiler name on most distros is c++
    - Check for the flag "CMAKE_COMPILER_IS_GNUCXX instead
---
 src/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 446988a..02d4d69 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -183,7 +183,7 @@ if( C_COMPILER_NAME STREQUAL "cl" )
 	string( REGEX REPLACE "/STACK:[0-9]+" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}" )
 	string( REGEX REPLACE "/STACK:[0-9]+" "" CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}" ) 
 
-elseif( C_COMPILER_NAME STREQUAL "gcc" )
+elseif( CMAKE_COMPILER_IS_GNUCXX )
 	message( STATUS "Detected GNU fortran compiler." )
 	EXEC_PROGRAM( ${CMAKE_CXX_COMPILER} ARGS --version OUTPUT_VARIABLE vnum )
 	STRING(REGEX REPLACE ".*([0-9])\\.([0-9])\\.([0-9]).*" "\\1\\2\\3" vnum ${vnum})
@@ -205,7 +205,7 @@ elseif( C_COMPILER_NAME STREQUAL "gcc" )
         set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage")
     endif()
 else( )
-	message( FATAL_ERROR "Compiler name not detected" )
+	message( FATAL_ERROR "Compiler not supported or not detected" )
 endif( )
 
 # If UNICODE is defined, pass extra definitions into 

-- 
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