summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-03-09 22:47:35 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-03-09 22:47:35 -0700
commit4a3ed6a7ce035f1b0ad7c8130242d052dc5efcec (patch)
treea534e14917b4585ed9e8be87ce4df648719ce597 /src
parent624245931f97a2442d2f9bb6b3fd2c6047bf69c1 (diff)
Check for CMAKE_C_COMPILER (not CC_COMPILER) when setting C flags.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d515ff3..cf9e17e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -75,7 +75,7 @@ set(CMAKE_LINKER_PROFILE "${CMAKE_LINKER_FLAGS_RELEASE} -pg")
if (${CMAKE_MAJOR_VERSION} GREATER 1 AND ${CMAKE_MINOR_VERSION} GREATER 8)
set(CMAKE_C_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
-elseif(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+elseif(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
endif ()