Commit 181f8ab8 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Support CMake 3.3+

I guess our hack for pre-3.3 doesn't work in 3.3, but thankfully
we can include both the pre-3.3 workaround and the actual 3.3+ fix,
and it looks like cmake will end up doing the right thing in both cases.
parent 37927451
...@@ -112,6 +112,7 @@ add_custom_target(gitsubmodules DEPENDS ${CMAKE_BINARY_DIR}/gitmodules) ...@@ -112,6 +112,7 @@ add_custom_target(gitsubmodules DEPENDS ${CMAKE_BINARY_DIR}/gitmodules)
# jemalloc # jemalloc
ExternalProject_Add(libjemalloc ExternalProject_Add(libjemalloc
BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/jemalloc/lib/libjemalloc.a
PREFIX jemalloc-build PREFIX jemalloc-build
SOURCE_DIR ${CMAKE_SOURCE_DIR}/build_deps/jemalloc SOURCE_DIR ${CMAKE_SOURCE_DIR}/build_deps/jemalloc
DEPENDS gitsubmodules DEPENDS gitsubmodules
...@@ -124,8 +125,8 @@ ExternalProject_Add(libjemalloc ...@@ -124,8 +125,8 @@ ExternalProject_Add(libjemalloc
LOG_INSTALL ON) LOG_INSTALL ON)
# #
# CMake (<3.3) has no way of knowing that an ExternalProject creates specific output files. This is a problem for ninja, # CMake (<3.3) does not support BUILD_BYPRODUCTS.
# which will not know how to build the generated file. # This is a problem for ninja, which will not know how to build the generated file.
# Here are a couple hacks to get around it: # Here are a couple hacks to get around it:
# #
# Add a copy step. This just hides the dependency but it seems to work. # Add a copy step. This just hides the dependency but it seems to work.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment