aboutsummaryrefslogtreecommitdiffstats
path: root/longbow
diff options
context:
space:
mode:
authorMauro Sardara <msardara+fdio@cisco.com>2017-10-17 15:17:50 +0200
committerMauro Sardara <msardara+fdio@cisco.com>2017-10-17 15:17:50 +0200
commit49ff69a0c3f33b03b2ebaac9098d6e8c88a5e8b6 (patch)
treec2456ef04112400ad23d739fce75109685de0378 /longbow
parent40418e3e4261cad4cb57b7b40e46bf2fdbf8c77b (diff)
Removing LongBow asserts in release build.
Change-Id: Ia554a5f2bbf6e226652b93dfb6ae2a9f072003cc Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
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)