simongog / sdsl-lite

Succinct Data Structure Library 2.0
Other
2.21k stars 350 forks source link

mode TI detection fails if sdsl-lite included as submodule in project #292

Closed mpetri closed 8 years ago

mpetri commented 8 years ago

The mode TI detection introduced by #286 fails if sdsl lite is included as a submodule / add_subdirectory in a parent project.

I think the solution is to change the line from:

try_compile(MODE_TI "${PROJECT_BINARY_DIR}" "${CMAKE_SOURCE_DIR}/CMakeModules/check_mode_ti.cpp")

to

try_compile(MODE_TI "${PROJECT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/check_mode_ti.cpp")

does this make sense @thinred ?

thinred commented 8 years ago

I think it does, although I haven't tested it. :)

farruggia commented 8 years ago

I came up with the same solution and it's working on my project. Please pull :-)

simongog commented 8 years ago

Merged now. Thanks guys!