[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 08/21: cmake: changed to using C checks for
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 08/21: cmake: changed to using C checks for headers instead of C++. |
Date: |
Sat, 9 May 2015 14:05:37 +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 0f28e6243d68f0461987ff8344be5cd6de2d10db
Author: Tom Rondeau <address@hidden>
Date: Wed Dec 31 14:50:08 2014 -0500
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 8fb4e3e..1ec2d9b 100644
--- a/gnuradio-runtime/lib/CMakeLists.txt
+++ b/gnuradio-runtime/lib/CMakeLists.txt
@@ -147,6 +147,7 @@ endif(ANDROID)
#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] 06/21: volk: using hypot instead of cabsf., (continued)
- [Commit-gnuradio] [gnuradio] 06/21: volk: using hypot instead of cabsf., git, 2015/05/09
- [Commit-gnuradio] [gnuradio] 04/21: runtime: android: issues related to vmcircbuf; only mmap_tmpfile version working currently., git, 2015/05/09
- [Commit-gnuradio] [gnuradio] 09/21: fft: defined a setting for the FFTW plan options if android or not., git, 2015/05/09
- [Commit-gnuradio] [gnuradio] 05/21: fft: android: problems with wisdom files and MEASURE version of FFTW. Defaulting to suboptimal ESTIMATE until we figure it out., git, 2015/05/09
- [Commit-gnuradio] [gnuradio] 13/21: runtime: moved global block registry to a static get function., git, 2015/05/09
- [Commit-gnuradio] [gnuradio] 17/21: controlport: android: cleaning up; better logs; help to support android., git, 2015/05/09
- [Commit-gnuradio] [gnuradio] 15/21: controlport: fixing complaints about no non-virtual dtor., git, 2015/05/09
- [Commit-gnuradio] [gnuradio] 03/21: runtime: android: Android does not support pthread_setaffinity_np; turned this into a nop call., git, 2015/05/09
- [Commit-gnuradio] [gnuradio] 18/21: controlport: better handling of Thrift checks for cross-compiling., git, 2015/05/09
- [Commit-gnuradio] [gnuradio] 14/21: controlport: build: allowing ControlPort and probes in static builds., git, 2015/05/09
- [Commit-gnuradio] [gnuradio] 08/21: cmake: changed to using C checks for headers instead of C++.,
git <=
- [Commit-gnuradio] [gnuradio] 11/21: runtime: android: more conversion of statics vars to static functions., git, 2015/05/09
- [Commit-gnuradio] [gnuradio] 20/21: runtime: android: setting better path for prefs files on Android., git, 2015/05/09
- [Commit-gnuradio] [gnuradio] 21/21: runtime: android: tweaking vmcircbuf setup for Android., git, 2015/05/09
- [Commit-gnuradio] [gnuradio] 19/21: android: cmake: prioritize ANDROID_STANDALONE_TOOLCHAIN over ANDROID_NDK., git, 2015/05/09
- [Commit-gnuradio] [gnuradio] 12/21: cmake: android: adding toolchain file for building., git, 2015/05/09