llvm.org GIT mirror llvm / 4b44283
CMake: Option for enabling/disabling threads. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59565 91177308-0d34-0410-b5e6-96231b3b80d8 Oscar Fuentes 10 years ago
2 changed file(s) with 13 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
4848 set(LLVM_TARGETS_TO_BUILD ${LLVM_ALL_TARGETS}
4949 CACHE STRING "Semicolon-separated list of targets to build, or \"all\".")
5050 endif( MSVC )
51
52 option(LLVM_ENABLE_THREADS "Use threads if available." ON)
5153
5254 if( LLVM_TARGETS_TO_BUILD STREQUAL "all" )
5355 set( LLVM_TARGETS_TO_BUILD ${LLVM_ALL_TARGETS} )
9292 # FIXME: Signal handler return type, currently hardcoded to 'void'
9393 set(RETSIGTYPE void)
9494
95 # Disable multithreading for now
96 set(ENABLE_THREADS 0)
95 if( LLVM_ENABLE_THREADS )
96 if( HAVE_PTHREAD_H OR WIN32 )
97 set(ENABLE_THREADS 1)
98 endif()
99 endif()
100
101 if( ENABLE_THREADS )
102 message(STATUS "Threads enabled.")
103 else( ENABLE_THREADS )
104 message(STATUS "Threads disabled.")
105 endif()
97106
98107 configure_file(
99108 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/config.h.cmake