cmark

My personal build of CMark ✏️

Commit
4a3ed6a7ce035f1b0ad7c8130242d052dc5efcec
Parent
624245931f97a2442d2f9bb6b3fd2c6047bf69c1
Author
John MacFarlane <jgm@berkeley.edu>
Date

Check for CMAKE_C_COMPILER (not CC_COMPILER) when setting C flags.

Diffstat

2 files changed, 2 insertions, 2 deletions

Status File Name N° Changes Insertions Deletions
Modified api_test/CMakeLists.txt 2 1 1
Modified src/CMakeLists.txt 2 1 1
diff --git a/api_test/CMakeLists.txt b/api_test/CMakeLists.txt
@@ -20,6 +20,6 @@ if(MSVC)
   endif()
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4127 /wd4244 /wd4267 /wd4706 /wd4800 /D_CRT_SECURE_NO_WARNINGS")
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /TP")
-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} -Wall -Wextra -std=c99 -pedantic")
 endif()
diff --git 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 ()