From b94534e74eea111da31a46c88652fe7018d9fe56 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Thu, 2 Apr 2015 00:36:01 -0400 Subject: fix PIC flag on old version of cmake --- utils/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'utils/CMakeLists.txt') diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index 58668254..6982fa11 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -1,4 +1,8 @@ -set(CMAKE_POSITION_INDEPENDENT_CODE ON) +if (CMAKE_VERSION VERSION_LESS 2.8.9) # TODO remove once we increase the cmake requirement + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -DPIC") +else() + set(CMAKE_POSITION_INDEPENDENT_CODE ON) +endif() set(TEST_SRCS dict_test.cc logval_test.cc -- cgit v1.2.3