From e59889d84fd7c5daf69465026f88f66bcd93eec6 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Sun, 29 Jun 2014 10:00:04 -0700 Subject: [PATCH] fix(build): do not build libraries when cross compiling Signed-off-by: Leonardo de Moura --- src/CMakeLists.txt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 66757ba28..590ebf53f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -271,9 +271,12 @@ file(GLOB_RECURSE LEAN_SOURCES add_style_check_target(style "${LEAN_SOURCES}") add_test(NAME style_check COMMAND ${LEAN_SOURCE_DIR}/cmake/Modules/cpplint.py ${LEAN_SOURCES}) -add_custom_target( - standard_lib ALL - COMMAND make LEAN=${CMAKE_BINARY_DIR}/shell/lean - DEPENDS ${CMAKE_BINARY_DIR}/shell/lean - WORKING_DIRECTORY ${LEAN_SOURCE_DIR}/../library/standard -) +if((${CYGWIN} EQUAL "1") OR (NOT (${CMAKE_SYSTEM_NAME} MATCHES "Windows"))) + # Only build libraries if we are NOT cross compiling + add_custom_target( + standard_lib ALL + COMMAND make LEAN=${CMAKE_BINARY_DIR}/shell/lean + DEPENDS ${CMAKE_BINARY_DIR}/shell/lean + WORKING_DIRECTORY ${LEAN_SOURCE_DIR}/../library/standard + ) +endif()