[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 03/12: android: cmake: changed to using C c
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 03/12: android: cmake: changed to using C checks for headers instead of C++. |
Date: |
Fri, 19 Feb 2016 13:58:39 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch android
in repository gnuradio.
commit ea00b6f1f335af14c4361bc52060b8f950f05a65
Author: Tom Rondeau <address@hidden>
Date: Wed Dec 31 14:50:08 2014 -0500
android: cmake: changed to using C checks for headers instead of C++.
---
cmake/Modules/GrMiscUtils.cmake | 4 ++--
gnuradio-runtime/ConfigChecks.cmake | 37 +++++++++++++++++++------------------
gnuradio-runtime/lib/CMakeLists.txt | 1 +
gr-blocks/lib/ConfigChecks.cmake | 1 +
4 files changed, 23 insertions(+), 20 deletions(-)
diff --git a/cmake/Modules/GrMiscUtils.cmake b/cmake/Modules/GrMiscUtils.cmake
index 188c404..4f8e3d8 100644
--- a/cmake/Modules/GrMiscUtils.cmake
+++ b/cmake/Modules/GrMiscUtils.cmake
@@ -47,8 +47,8 @@ endfunction(GR_ADD_COND_DEF)
# - def the pre-processor definition to set
########################################################################
function(GR_CHECK_HDR_N_DEF hdr def)
- include(CheckIncludeFileCXX)
- CHECK_INCLUDE_FILE_CXX(${hdr} ${def})
+ include(CheckIncludeFile)
+ CHECK_INCLUDE_FILE(${hdr} ${def})
GR_ADD_COND_DEF(${def})
endfunction(GR_CHECK_HDR_N_DEF)
diff --git a/gnuradio-runtime/ConfigChecks.cmake
b/gnuradio-runtime/ConfigChecks.cmake
index 9487d6a..bdc3ce2 100644
--- a/gnuradio-runtime/ConfigChecks.cmake
+++ b/gnuradio-runtime/ConfigChecks.cmake
@@ -20,6 +20,7 @@
########################################################################
INCLUDE(GrMiscUtils)
INCLUDE(CheckCXXSourceCompiles)
+INCLUDE(CheckCSourceCompiles)
IF(MSVC) #add this directory for our provided headers
LIST(APPEND CMAKE_REQUIRED_INCLUDES ${CMAKE_SOURCE_DIR}/msvc)
@@ -45,7 +46,7 @@ GR_CHECK_HDR_N_DEF(malloc.h HAVE_MALLOC_H)
########################################################################
-CHECK_CXX_SOURCE_COMPILES("
+CHECK_C_SOURCE_COMPILES("
#include <stdio.h>
int main(){snprintf(0, 0, 0); return 0;}
" HAVE_SNPRINTF
@@ -53,7 +54,7 @@ CHECK_CXX_SOURCE_COMPILES("
GR_ADD_COND_DEF(HAVE_SNPRINTF)
########################################################################
-CHECK_CXX_SOURCE_COMPILES("
+CHECK_C_SOURCE_COMPILES("
#include <signal.h>
int main(){sigaction(0, 0, 0); return 0;}
" HAVE_SIGACTION
@@ -61,7 +62,7 @@ CHECK_CXX_SOURCE_COMPILES("
GR_ADD_COND_DEF(HAVE_SIGACTION)
########################################################################
-CHECK_CXX_SOURCE_COMPILES("
+CHECK_C_SOURCE_COMPILES("
#include <sys/select.h>
int main(){select(0, 0, 0, 0, 0); return 0;}
" HAVE_SELECT
@@ -70,14 +71,14 @@ GR_ADD_COND_DEF(HAVE_SELECT)
########################################################################
-CHECK_CXX_SOURCE_COMPILES("
+CHECK_C_SOURCE_COMPILES("
#include <unistd.h>
int main(){sysconf(0); return 0;}
" HAVE_SYSCONF
)
GR_ADD_COND_DEF(HAVE_SYSCONF)
-CHECK_CXX_SOURCE_COMPILES("
+CHECK_C_SOURCE_COMPILES("
#include <unistd.h>
int main(){getpagesize(); return 0;}
" HAVE_GETPAGESIZE
@@ -86,21 +87,21 @@ GR_ADD_COND_DEF(HAVE_GETPAGESIZE)
########################################################################
-CHECK_CXX_SOURCE_COMPILES("
+CHECK_C_SOURCE_COMPILES("
#include <Winbase.h>
int main(){Sleep(0); return 0;}
" HAVE_SSLEEP
)
GR_ADD_COND_DEF(HAVE_SSLEEP)
-CHECK_CXX_SOURCE_COMPILES("
+CHECK_C_SOURCE_COMPILES("
#include <time.h>
int main(){nanosleep(0, 0); return 0;}
" HAVE_NANOSLEEP
)
GR_ADD_COND_DEF(HAVE_NANOSLEEP)
-CHECK_CXX_SOURCE_COMPILES("
+CHECK_C_SOURCE_COMPILES("
#include <sys/time.h>
int main(){gettimeofday(0, 0); return 0;}
" HAVE_GETTIMEOFDAY
@@ -108,14 +109,14 @@ CHECK_CXX_SOURCE_COMPILES("
GR_ADD_COND_DEF(HAVE_GETTIMEOFDAY)
########################################################################
-CHECK_CXX_SOURCE_COMPILES("
+CHECK_C_SOURCE_COMPILES("
#include <stdlib.h>
int main(){posix_memalign(0, 0, 0); return 0;}
" HAVE_POSIX_MEMALIGN
)
GR_ADD_COND_DEF(HAVE_POSIX_MEMALIGN)
-CHECK_CXX_SOURCE_COMPILES("
+CHECK_C_SOURCE_COMPILES("
#include <malloc.h>
int main(){valloc(0); return 0;}
" HAVE_VALLOC
@@ -131,7 +132,7 @@ endif()
########################################################################
SET(CMAKE_REQUIRED_LIBRARIES -lpthread)
-CHECK_CXX_SOURCE_COMPILES("
+CHECK_C_SOURCE_COMPILES("
#include <signal.h>
int main(){pthread_sigmask(0, 0, 0); return 0;}
" HAVE_PTHREAD_SIGMASK
@@ -140,7 +141,7 @@ GR_ADD_COND_DEF(HAVE_PTHREAD_SIGMASK)
SET(CMAKE_REQUIRED_LIBRARIES)
########################################################################
-CHECK_CXX_SOURCE_COMPILES("
+CHECK_C_SOURCE_COMPILES("
#include <windows.h>
int main(){
HANDLE handle;
@@ -160,7 +161,7 @@ GR_ADD_COND_DEF(HAVE_CREATEFILEMAPPING)
########################################################################
SET(CMAKE_REQUIRED_LIBRARIES -lrt)
-CHECK_CXX_SOURCE_COMPILES("
+CHECK_C_SOURCE_COMPILES("
#include <sys/types.h>
#include <sys/mman.h>
int main(){shm_open(0, 0, 0); return 0;}
@@ -170,7 +171,7 @@ GR_ADD_COND_DEF(HAVE_SHM_OPEN)
SET(CMAKE_REQUIRED_LIBRARIES)
########################################################################
-CHECK_CXX_SOURCE_COMPILES("
+CHECK_C_SOURCE_COMPILES("
#define _GNU_SOURCE
#include <math.h>
int main(){double x, sin, cos; sincos(x, &sin, &cos); return 0;}
@@ -178,7 +179,7 @@ CHECK_CXX_SOURCE_COMPILES("
)
GR_ADD_COND_DEF(HAVE_SINCOS)
-CHECK_CXX_SOURCE_COMPILES("
+CHECK_C_SOURCE_COMPILES("
#define _GNU_SOURCE
#include <math.h>
int main(){float x, sin, cos; sincosf(x, &sin, &cos); return 0;}
@@ -186,14 +187,14 @@ CHECK_CXX_SOURCE_COMPILES("
)
GR_ADD_COND_DEF(HAVE_SINCOSF)
-CHECK_CXX_SOURCE_COMPILES("
+CHECK_C_SOURCE_COMPILES("
#include <math.h>
int main(){sinf(0); return 0;}
" HAVE_SINF
)
GR_ADD_COND_DEF(HAVE_SINF)
-CHECK_CXX_SOURCE_COMPILES("
+CHECK_C_SOURCE_COMPILES("
#include <math.h>
int main(){cosf(0); return 0;}
" HAVE_COSF
@@ -201,7 +202,7 @@ CHECK_CXX_SOURCE_COMPILES("
GR_ADD_COND_DEF(HAVE_COSF)
########################################################################
-CHECK_CXX_SOURCE_COMPILES("
+CHECK_C_SOURCE_COMPILES("
#include <sys/mman.h>
int main(){mmap(0, 0, 0, 0, 0, 0); return 0;}
" HAVE_MMAP
diff --git a/gnuradio-runtime/lib/CMakeLists.txt
b/gnuradio-runtime/lib/CMakeLists.txt
index cc51f97..5ee90c5 100644
--- a/gnuradio-runtime/lib/CMakeLists.txt
+++ b/gnuradio-runtime/lib/CMakeLists.txt
@@ -145,6 +145,7 @@ list(APPEND gnuradio_runtime_libs
)
#Add libraries for winsock2.h on Windows
+INCLUDE(CheckIncludeFileCXX)
CHECK_INCLUDE_FILE_CXX(windows.h HAVE_WINDOWS_H)
IF(HAVE_WINDOWS_H)
ADD_DEFINITIONS(-DHAVE_WINDOWS_H -DUSING_WINSOCK -DWIN32_LEAN_AND_MEAN)
diff --git a/gr-blocks/lib/ConfigChecks.cmake b/gr-blocks/lib/ConfigChecks.cmake
index 7f60aed..d93abee 100644
--- a/gr-blocks/lib/ConfigChecks.cmake
+++ b/gr-blocks/lib/ConfigChecks.cmake
@@ -20,6 +20,7 @@
########################################################################
INCLUDE(GrMiscUtils)
INCLUDE(CheckCXXSourceCompiles)
+INCLUDE(CheckIncludeFileCXX)
IF(MSVC) #add this directory for our provided headers
LIST(APPEND CMAKE_REQUIRED_INCLUDES ${CMAKE_SOURCE_DIR}/msvc)
- [Commit-gnuradio] [gnuradio] branch android updated (ff27361 -> b7870d6), git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 12/12: analog: add ControlPort interfaces to frequency_modulator block., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 05/12: android: logger: adding Android log functions for different logging levels., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 07/12: android: runtime: issues related to vmcircbuf; only mmap_tmpfile version working currently., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 03/12: android: cmake: changed to using C checks for headers instead of C++.,
git <=
- [Commit-gnuradio] [gnuradio] 08/12: android: runtime: need to use a usable, writable location for android apps, so use the tmp path that we set up to point to the app's home directory., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 04/12: android: cmake: adding Boost deps used static builds; ordering in this patch is important., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 06/12: android: runtime: Android does not support pthread_setaffinity_np; turned this into a nop call., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 09/12: android: runtime: moved global block registry to a static get function., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 10/12: android: rutnime: better logging and cleanup, git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 11/12: cmake: cmake should get native thrift binary when cross compiling., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 01/12: android: fft: problems with wisdom files and MEASURE version of FFTW. Using a setting for the FFTW plan options if android or not., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 02/12: android: cmake: adding toolchain file for building., git, 2016/02/19