Merge pull request #269 from ityuhui/yh-c-compiler-20250607

Support C compiler build
This commit is contained in:
Kubernetes Prow Robot
2025-06-07 10:14:39 -07:00
committed by GitHub
2 changed files with 4 additions and 7 deletions

View File

@@ -1,9 +1,6 @@
cmake_minimum_required (VERSION 2.6...3.10.2)
project (CGenerator C)
enable_language(C)
enable_language(CXX)
cmake_policy(SET CMP0063 NEW)
set(CMAKE_C_VISIBILITY_PRESET default)

View File

@@ -1,5 +1,5 @@
include(CheckCXXSymbolExists)
include(CheckSymbolExists)
check_cxx_symbol_exists(strndup "string.h" HAVE_STRNDUP)
check_cxx_symbol_exists(secure_getenv "stdlib.h" HAVE_SECURE_GETENV)
check_cxx_symbol_exists(getenv "stdlib.h" HAVE_GETENV)
check_symbol_exists(strndup "string.h" HAVE_STRNDUP)
check_symbol_exists(secure_getenv "stdlib.h" HAVE_SECURE_GETENV)
check_symbol_exists(getenv "stdlib.h" HAVE_GETENV)