ports/astro/libosmpbf/files/patch-tools_CMakeLists.txt
Adriaan de Groot c91270bd8d Update CMake to 3.9, merge devel/cmake-modules into devel/cmake
Thanks to antoine@ for the exp-run.

Approved by:		rakuco (mentor)
Reviewed by:		tcberner (mentor)
Reviewed by:		mat
PR:			222000 (exp-run)
Differential Revision:	https://reviews.freebsd.org/D12299
2017-09-14 21:02:51 +00:00

21 lines
761 B
Text

Don't use special compiler flags.
Add upstream patch to make dependencies explicit; needed for ninja builds.
--- tools/CMakeLists.txt.orig 2014-03-15 15:11:32 UTC
+++ tools/CMakeLists.txt
@@ -4,7 +4,6 @@ PROJECT(${PROJECT})
if(MSVC)
set(CMAKE_CXX_FLAGS "/O3")
else()
- set(CMAKE_CXX_FLAGS "-O3 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64")
endif()
SET(CPP_SRC osmpbf-outline.cpp)
@@ -10,6 +10,8 @@ endif()
SET(CPP_SRC osmpbf-outline.cpp)
SET(HPP_SRC "")
SET(C_SRC "")
+set_source_files_properties(${CPP_SRC}
+ OBJECT_DEPENDS "${CMAKE_SOURCE_DIR}/include/osmpbf/fileformat.pb.h;${CMAKE_SOURCE_DIR}/include/osmpbf/osmformat.pb.h")
include_directories("${CMAKE_SOURCE_DIR}/include")
add_executable(${PROJECT} ${HPP_SRC} ${CPP_SRC} ${C_SRC})