aboutsummaryrefslogtreecommitdiffstats
path: root/longbow
diff options
context:
space:
mode:
Diffstat (limited to 'longbow')
-rw-r--r--longbow/CMakeLists.txt20
1 files changed, 14 insertions, 6 deletions
diff --git a/longbow/CMakeLists.txt b/longbow/CMakeLists.txt
index 20fc9c0b..ac34f8b5 100644
--- a/longbow/CMakeLists.txt
+++ b/longbow/CMakeLists.txt
@@ -64,12 +64,25 @@ elseif(COMPILE_FOR_IOS)
message("############ Detected cross compile for ${CMAKE_SYSTEM_NAME}")
message("############ This build will not include doxygen, tools, or tests")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
+
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_FLAGS}")
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${CMAKE_C_FLAGS} -DLongBow_DISABLE_ASSERTIONS")
+ set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${CMAKE_C_FLAGS}")
+ set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${CMAKE_C_FLAGS}")
+
macro(AddTest testFile)
message("IOS build: Skipping test ${ARGV0}")
endmacro(AddTest)
add_subdirectory(src)
else()
+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE")
+
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_FLAGS}")
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${CMAKE_C_FLAGS} -DLongBow_DISABLE_ASSERTIONS")
+ set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${CMAKE_C_FLAGS}")
+ set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${CMAKE_C_FLAGS}")
+
macro(AddTest testFile)
add_executable(${ARGV0} ${ARGV0}.c)
target_link_libraries(${ARGV0} ${PARC_BIN_LIBRARIES})
@@ -81,11 +94,6 @@ else()
add_subdirectory(documentation)
endif()
-set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_FLAGS}")
-set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${CMAKE_C_FLAGS}")
-set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${CMAKE_C_FLAGS}")
-set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${CMAKE_C_FLAGS}")
-
# Generate DEB / RPM packages
option(DEB_PACKAGE "Create deb package" OFF)
@@ -163,4 +171,4 @@ set(CPACK_${TYPE}_PACKAGE_VENDOR ${VENDOR})
set(CPACK_${TYPE}_PACKAGE_DESCRIPTION "Runtime and testing framework for C applications.")
set(CPACK_${TYPE}_PACKAGE_HOMEPAGE "https://wiki.fd.io/view/Cframework")
-include(CPack) \ No newline at end of file
+include(CPack)