Skip to content
Snippets Groups Projects
Commit 4e4764de authored by kutscher's avatar kutscher
Browse files

adds general support for Clang

parent f6ee46a6
No related branches found
No related tags found
No related merge requests found
......@@ -75,8 +75,9 @@ MACRO(SET_CAB_COMPILER)
ELSE()
SET( CAB_COMPILER "msvc19_32" )
ENDIF()
ELSEIF(APPLE)
SET( CAB_COMPILER "llvm" )
#ELSEIF(APPLE)
ELSEIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
SET( CAB_COMPILER "clang" )
ELSE()
EXEC_PROGRAM( ${CMAKE_CXX_COMPILER}
ARGS --version
......@@ -91,7 +92,6 @@ MACRO(SET_CAB_COMPILER)
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CAB_COMPILER_NAME "gcc")
#SET(CAB_ADDITIONAL_LINK_FLAGS ${CAB_ADDITIONAL_LINK_FLAGS} -lgomp)
SET(USE_GCC ON)
ENDIF()
......
......@@ -11,7 +11,7 @@ MACRO(SET_COMPILER_SPECIFIC_FLAGS compiler_type build_type)
OPTION(USE_OPENMP "activate open" ON)
IF(APPLE)
IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
SET(USE_OPENMP OFF)
ENDIF()
......
###############################################################################################################
##
## gcc74
## clang
##
###############################################################################################################
......@@ -8,7 +8,7 @@ MACRO(SET_COMPILER_SPECIFIC_FLAGS_INTERN build_type use64BitOptions)
#############################################################################################################
# Flags
#############################################################################################################
LIST(APPEND CAB_COMPILER_ADDTIONAL_CXX_COMPILER_FLAGS "-O3 -fomit-frame-pointer -finline-functions -fPIC")
LIST(APPEND CAB_COMPILER_ADDTIONAL_CXX_COMPILER_FLAGS "-O3 -fomit-frame-pointer -finline-functions -fPIC -Wbackslash-newline-escape")
LIST(APPEND CAB_COMPILER_ADDTIONAL_C_COMPILER_FLAGS "-O3 -fomit-frame-pointer -finline-functions -fPIC")
......@@ -24,8 +24,8 @@ MACRO(SET_COMPILER_SPECIFIC_FLAGS_INTERN build_type use64BitOptions)
# OpenMP support
#############################################################################################################
IF(USE_OPENMP)
LIST(APPEND CAB_COMPILER_ADDTIONAL_CXX_COMPILER_FLAGS "-fopenmp")
LIST(APPEND CAB_COMPILER_ADDTIONAL_C_COMPILER_FLAGS "-fopenmp")
#LIST(APPEND CAB_COMPILER_ADDTIONAL_CXX_COMPILER_FLAGS "-fopenmp")
#LIST(APPEND CAB_COMPILER_ADDTIONAL_C_COMPILER_FLAGS "-fopenmp")
ENDIF()
#############################################################################################################
......@@ -44,7 +44,7 @@ MACRO(SET_COMPILER_SPECIFIC_FLAGS_INTERN build_type use64BitOptions)
# disable warning
#############################################################################################################
LIST(APPEND CAB_COMPILER_ADDTIONAL_CXX_COMPILER_FLAGS "-Wno-deprecated") #deprecated header warning
LIST(APPEND CAB_COMPILER_ADDTIONAL_CXX_COMPILER_FLAGS "-Wbackslash-newline-escape") #backslash and newline separated by space
#LIST(APPEND CAB_COMPILER_ADDTIONAL_CXX_COMPILER_FLAGS "-Wbackslash-newline-escape") #backslash and newline separated by space
LIST(APPEND CAB_COMPILER_ADDTIONAL_CXX_COMPILER_FLAGS "-Wcomment") #'/*' within block comment
LIST(APPEND CAB_COMPILER_ADDTIONAL_C_COMPILER_FLAGS "-Wbackslash-newline-escape") #backslash and newline separated by space
......
###############################################################################################################
##
## gcc74
## gcc generic
##
###############################################################################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment