[llvm-commits] [llvm] r59565 - in /llvm/trunk: CMakeLists.txt cmake/config-ix.cmake
Oscar Fuentes
ofv at wanadoo.es
Tue Nov 18 15:45:21 PST 2008
Author: ofv
Date: Tue Nov 18 17:45:21 2008
New Revision: 59565
URL: http://llvm.org/viewvc/llvm-project?rev=59565&view=rev
Log:
CMake: Option for enabling/disabling threads.
Modified:
llvm/trunk/CMakeLists.txt
llvm/trunk/cmake/config-ix.cmake
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=59565&r1=59564&r2=59565&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Tue Nov 18 17:45:21 2008
@@ -50,6 +50,8 @@
CACHE STRING "Semicolon-separated list of targets to build, or \"all\".")
endif( MSVC )
+option(LLVM_ENABLE_THREADS "Use threads if available." ON)
+
if( LLVM_TARGETS_TO_BUILD STREQUAL "all" )
set( LLVM_TARGETS_TO_BUILD ${LLVM_ALL_TARGETS} )
endif()
Modified: llvm/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/config-ix.cmake?rev=59565&r1=59564&r2=59565&view=diff
==============================================================================
--- llvm/trunk/cmake/config-ix.cmake (original)
+++ llvm/trunk/cmake/config-ix.cmake Tue Nov 18 17:45:21 2008
@@ -93,8 +93,17 @@
# FIXME: Signal handler return type, currently hardcoded to 'void'
set(RETSIGTYPE void)
-# Disable multithreading for now
-set(ENABLE_THREADS 0)
+if( LLVM_ENABLE_THREADS )
+ if( HAVE_PTHREAD_H OR WIN32 )
+ set(ENABLE_THREADS 1)
+ endif()
+endif()
+
+if( ENABLE_THREADS )
+ message(STATUS "Threads enabled.")
+else( ENABLE_THREADS )
+ message(STATUS "Threads disabled.")
+endif()
configure_file(
${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/config.h.cmake
More information about the llvm-commits
mailing list