Skip to content

Commit

Permalink
PARQUET-448: Add cmake options to not build tests and/or executables
Browse files Browse the repository at this point in the history
This patch adds `PARQUET_BUILD_TESTS` and `PARQUET_BUILD_EXECUTABLES` options.

For example:

```
$ cmake -DPARQUET_BUILD_TESTS=OFF -DPARQUET_BUILD_EXECUTABLES=OFF ..
```

This will accelerate builds in 3rd-party use. When the library is more mature we can set the default for `PARQUET_BUILD_TESTS` to `OFF`

Author: Wes McKinney <[email protected]>

Closes apache#39 from wesm/PARQUET-448 and squashes the following commits:

6bf6a54 [Wes McKinney] Add cmake options to not build tests and/or executables

Change-Id: Iff0745b88eed7265b8c4905e7db1e860d21b60ca
  • Loading branch information
wesm authored and julienledem committed Feb 6, 2016
1 parent 003a10e commit e460b09
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions cpp/src/parquet/util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,22 @@ add_library(parquet_util STATIC
cpu-info.cc
)

add_library(parquet_test_main
test_main.cc)

if (APPLE)
target_link_libraries(parquet_test_main
gtest
dl)
set_target_properties(parquet_test_main
PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
else()
target_link_libraries(parquet_test_main
dl
gtest
pthread
)
if(PARQUET_BUILD_TESTS)
add_library(parquet_test_main
test_main.cc)
if (APPLE)
target_link_libraries(parquet_test_main
gtest
dl)
set_target_properties(parquet_test_main
PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
else()
target_link_libraries(parquet_test_main
dl
gtest
pthread
)
endif()
endif()

ADD_PARQUET_TEST(bit-util-test)
Expand Down

0 comments on commit e460b09

Please sign in to comment.