From 737ed7a7f932b1a7e40d2755bcdee6bc0aa2de63 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 --- decoder/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'decoder') diff --git a/decoder/CMakeLists.txt b/decoder/CMakeLists.txt index ac07e9fe..b49d6477 100644 --- a/decoder/CMakeLists.txt +++ b/decoder/CMakeLists.txt @@ -3,9 +3,13 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../mteval) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../klm) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..) -PROJECT(decoder C CXX) +PROJECT(decoder CXX) -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() find_package(FLEX REQUIRED) -- cgit v1.2.3