mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
22 lines
363 B
CMake
22 lines
363 B
CMake
include (CheckCXXSourceCompiles)
|
|
include (CMakePushCheckState)
|
|
|
|
cmake_push_check_state ()
|
|
|
|
set (TEST_FLAG "-no-pie")
|
|
set (CMAKE_REQUIRED_FLAGS "${TEST_FLAG}")
|
|
|
|
check_cxx_source_compiles("
|
|
int main() {
|
|
return 0;
|
|
}
|
|
" HAVE_NO_PIE)
|
|
|
|
set (CMAKE_REQUIRED_FLAGS "")
|
|
|
|
if (HAVE_NO_PIE)
|
|
set (FLAG_NO_PIE ${TEST_FLAG})
|
|
endif ()
|
|
|
|
cmake_pop_check_state ()
|