Last active
August 29, 2015 14:21
-
-
Save JrGoodle/bcbfb78c33e16cdc0a5e to your computer and use it in GitHub Desktop.
Check for current C++ compiler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configuration based on current compiler | |
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") | |
# using Clang | |
set(COMPILER_NAME "Clang") | |
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") | |
# using GCC | |
set(COMPILER_NAME "GCC") | |
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") | |
# using Intel C++ | |
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") | |
# using Visual Studio C++ | |
endif() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment