aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libparc/CMakeLists.txt4
-rw-r--r--longbow/CMakeLists.txt20
2 files changed, 16 insertions, 8 deletions
diff --git a/libparc/CMakeLists.txt b/libparc/CMakeLists.txt
index defa060a..b3ebc2aa 100644
--- a/libparc/CMakeLists.txt
+++ b/libparc/CMakeLists.txt
@@ -35,7 +35,7 @@ else()
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} -DPARCLibrary_DISABLE_VALIDATION")
+set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${CMAKE_C_FLAGS} -DPARCLibrary_DISABLE_VALIDATION -DLongBow_DISABLE_ASSERTIONS")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${CMAKE_C_FLAGS}")
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} ${CMAKE_C_FLAGS}")
@@ -84,7 +84,7 @@ if (ANDROID_API)
message("Android build: Skipping test ${ARGV0}")
endmacro(AddTest)
elseif(COMPILE_FOR_IOS)
- macro(AddTest testFile)
+ macro(AddTest testFile)
message("iOS build: Skipping test ${ARGV0}")
endmacro(AddTest)
else()
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)