summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2018-09-06 12:57:16 -0700
committerJoshua Haberman <jhaberman@gmail.com>2018-09-06 12:57:16 -0700
commitf7713ebc391d247617b0dff788a76e5c3383ae94 (patch)
tree3542a54abd18ed5d1eef586ac331b1d66f7c612e /CMakeLists.txt
parent694d51f4d6cb8adf4a2f7975e5bb899327875de7 (diff)
Changed C API to use inline functions and computed offsets.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 10 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fcf9851..236fd4d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,12 +33,16 @@ endif()
# Implement ASAN/UBSAN options
if(UPB_ENABLE_ASAN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
- set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fsanitize=address")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address")
endif()
if(UPB_ENABLE_UBSAN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
- set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fsanitize=undefined")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address")
endif()
include_directories(.)
@@ -166,7 +170,8 @@ if(LUA_FOUND AND PROTOBUF_FOUND)
${CMAKE_CURRENT_BINARY_DIR}/google/protobuf/timestamp.upb.c
${CMAKE_CURRENT_BINARY_DIR}/google/protobuf/wrappers.upb.c
${CMAKE_CURRENT_BINARY_DIR}/conformance.upb.c
- DEPENDS upbc ${CMAKE_CURRENT_SOURCE_DIR}/third_party/protobuf/conformance/conformance.proto
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/tools/upbc
+ ${CMAKE_CURRENT_SOURCE_DIR}/third_party/protobuf/conformance/conformance.proto
COMMAND protoc --include_imports
${CMAKE_CURRENT_SOURCE_DIR}/third_party/protobuf/conformance/conformance.proto
${CMAKE_CURRENT_SOURCE_DIR}/third_party/protobuf/src/google/protobuf/test_messages_proto3.proto
@@ -179,7 +184,8 @@ if(LUA_FOUND AND PROTOBUF_FOUND)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/google/protobuf/descriptor.upb.h
${CMAKE_CURRENT_BINARY_DIR}/google/protobuf/descriptor.upb.c
- DEPENDS upbc ${CMAKE_CURRENT_SOURCE_DIR}/google/protobuf/descriptor.proto
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/tools/upbc
+ ${CMAKE_CURRENT_SOURCE_DIR}/google/protobuf/descriptor.proto
COMMAND protoc
${CMAKE_CURRENT_SOURCE_DIR}/google/protobuf/descriptor.proto
-I${CMAKE_CURRENT_SOURCE_DIR}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback