Skip to content
This repository was archived by the owner on Apr 13, 2019. It is now read-only.

Commit c798c05

Browse files
Glenn ScottGlenn Scott
Glenn Scott
authored and
Glenn Scott
committed
Merge pull request #7 from CCNX/revert-6-3914-ayyagari-crosscompile-for-android
Revert "3914 ayyagari crosscompile for android"
2 parents 0449621 + 487bcf5 commit c798c05

File tree

8 files changed

+23
-1304
lines changed

8 files changed

+23
-1304
lines changed

CMakeLists.txt

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,7 @@ include( CTest )
1717
include( version )
1818
include( detectCacheSize )
1919

20-
if(DEFINED ENV{ANDROID_API})
21-
message("... detected cross compile for $ENV{ANDROID_API_VERSION}")
22-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -D_ANDROID_ -D_$ENV{ANDROID_API_VERSION}_")
23-
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} $ENV{LDFLAGS}")
24-
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} $ENV{LDFLAGS}")
25-
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} $ENV{LDFLAGS}")
26-
else()
27-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
28-
endif()
29-
20+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
3021

3122
include_directories(${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR}/ccnx/forwarder/metis)
3223

ccnx/forwarder/metis/CMakeLists.txt

Lines changed: 22 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -258,31 +258,20 @@ set(METIS_TLV_SOURCE
258258

259259
source_group(tlv FILES ${METIS_TLV_SOURCE})
260260

261-
if(DEFINED ENV{ANDROID_API})
262-
message("... detected cross compile for $ENV{ANDROID_API_VERSION} ignoring tests")
263-
set(METIS_PLATFORM_MODULES
264-
platforms/android/metis_GenericEther.c
265-
platforms/android/metis_System.c
266-
platforms/android/ifaddrs.c
267-
)
268-
source_group(platforms FILES ${METIS_PLATFORM_MODULES})
269-
else()
270-
if ( APPLE )
271-
set(METIS_PLATFORM_MODULES
272-
platforms/darwin/metis_GenericEther.c
273-
platforms/darwin/metis_System.c
274-
)
275-
source_group(platforms FILES ${METIS_PLATFORM_MODULES})
276-
endif()
277-
278-
if( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
279-
set(METIS_PLATFORM_MODULES
280-
platforms/linux/metis_GenericEther.c
281-
platforms/linux/metis_System.c
282-
)
283-
endif()
261+
if ( APPLE )
262+
set(METIS_PLATFORM_MODULES
263+
platforms/darwin/metis_GenericEther.c
264+
platforms/darwin/metis_System.c
265+
)
266+
source_group(platforms FILES ${METIS_PLATFORM_MODULES})
284267
endif()
285268

269+
if( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
270+
set(METIS_PLATFORM_MODULES
271+
platforms/linux/metis_GenericEther.c
272+
platforms/linux/metis_System.c
273+
)
274+
endif()
286275

287276
set(METIS_SOURCE_FILES
288277
metis_About.c
@@ -308,17 +297,13 @@ foreach(lib ${metis_libraries})
308297
set_property(TARGET ${lib} PROPERTY C_STANDARD 99)
309298
endforeach()
310299

311-
if(DEFINED ENV{ANDROID_API})
312-
message("... detected cross compile for $ENV{ANDROID_API_VERSION} ignoring tests")
313-
else()
314-
add_subdirectory(test)
315-
add_subdirectory(command-line)
316-
add_subdirectory(tlv/test)
317-
add_subdirectory(strategies/test)
318-
add_subdirectory(processor/test)
319-
add_subdirectory(messenger/test)
320-
add_subdirectory(io/test)
321-
add_subdirectory(core/test)
322-
add_subdirectory(content_store/test)
323-
add_subdirectory(config/test)
324-
endif()
300+
add_subdirectory(test)
301+
add_subdirectory(command-line)
302+
add_subdirectory(tlv/test)
303+
add_subdirectory(strategies/test)
304+
add_subdirectory(processor/test)
305+
add_subdirectory(messenger/test)
306+
add_subdirectory(io/test)
307+
add_subdirectory(core/test)
308+
add_subdirectory(content_store/test)
309+
add_subdirectory(config/test)

ccnx/forwarder/metis/config/metis_CommandOps.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,11 @@
6767
#include <LongBow/runtime.h>
6868
#include <string.h>
6969

70-
#ifndef _ANDROID_
7170
#ifdef HAVE_ERRNO_H
7271
#include <errno.h>
7372
#else
7473
extern int errno;
7574
#endif
76-
#endif
7775

7876
#include <parc/algol/parc_Memory.h>
7977

ccnx/forwarder/metis/config/metis_CommandParser.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,11 @@
7878

7979
#include <ccnx/forwarder/metis/config/metis_CommandParser.h>
8080

81-
#ifndef _ANDROID_
8281
#ifdef HAVE_ERRNO_H
8382
#include <errno.h>
8483
#else
8584
extern int errno;
8685
#endif
87-
#endif
8886

8987
struct metis_command_parser {
9088
// key = command, value = MetisCommandOps

0 commit comments

Comments
 (0)