Commit 77be443b authored by Léonard Gérard's avatar Léonard Gérard Committed by Facebook Github Bot

Fix CMakeLists.txt to not exclude everything with 'build' in pathname

Summary:
The cmake globbing then excluding strategy implies that if the directory
in which we are compiling has a folder named `build` on its path like `/home/alice/project/build/folly/...`, everything breaks.
Note that it is the same for `tools` and `test`, I also fixed the tools one, but the test once has many files.... Using a file list would be the real solution.
Closes https://github.com/facebook/folly/pull/815

Reviewed By: simpkins

Differential Revision: D7624035

Pulled By: yfeldblum

fbshipit-source-id: a3f1d2f82e55e070d13acc5c394d8cfdfabeb7ed
parent 5e1a06ae
...@@ -99,14 +99,14 @@ auto_sources(hfiles "*.h" "RECURSE" "${FOLLY_DIR}") ...@@ -99,14 +99,14 @@ auto_sources(hfiles "*.h" "RECURSE" "${FOLLY_DIR}")
# library sources. Test sources are listed separately below. # library sources. Test sources are listed separately below.
REMOVE_MATCHES_FROM_LISTS(files hfiles REMOVE_MATCHES_FROM_LISTS(files hfiles
MATCHES MATCHES
"/build/" "^${FOLLY_DIR}/build/"
"/experimental/exception_tracer/" "^${FOLLY_DIR}/experimental/exception_tracer/"
"/experimental/hazptr/bench/" "^${FOLLY_DIR}/experimental/hazptr/bench/"
"/experimental/hazptr/example/" "^${FOLLY_DIR}/experimental/hazptr/example/"
"/experimental/logging/example/" "^${FOLLY_DIR}/experimental/logging/example/"
"/futures/exercises/" "^${FOLLY_DIR}/futures/exercises/"
"/test/" "^${FOLLY_DIR}/(.*/)?test/"
"/tools/" "^${FOLLY_DIR}/tools/"
"Benchmark.cpp$" "Benchmark.cpp$"
"Test.cpp$" "Test.cpp$"
) )
...@@ -151,7 +151,7 @@ list(APPEND hfiles ...@@ -151,7 +151,7 @@ list(APPEND hfiles
if (NOT FOLLY_USE_SYMBOLIZER) if (NOT FOLLY_USE_SYMBOLIZER)
REMOVE_MATCHES_FROM_LISTS(files hfiles REMOVE_MATCHES_FROM_LISTS(files hfiles
MATCHES MATCHES
"/experimental/symbolizer/" "^${FOLLY_DIR}/experimental/symbolizer/"
) )
list(REMOVE_ITEM files list(REMOVE_ITEM files
${FOLLY_DIR}/SingletonStackTrace.cpp ${FOLLY_DIR}/SingletonStackTrace.cpp
......
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