llvm.org GIT mirror llvm / de98db3
CMake: MSVC++ no longer uses a special configuration method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58132 91177308-0d34-0410-b5e6-96231b3b80d8 Oscar Fuentes 10 years ago
4 changed file(s) with 52 addition(s) and 30 deletion(s). Raw diff Collapse all Expand all
6464 # find_file(HAVE_LLVM_CONFIG llvm-config ${LLVM_TOOLS_BINARY_DIR})
6565 # message(STATUS ${HAVE_LLVM_CONFIG})
6666
67 if( MSVC )
68 message(STATUS "Configuring using MSVC hack.")
69 include(config-w32)
70 else( MSVC )
71 message(STATUS "Configuring traditional style.")
72 include(config-ix)
73 endif( MSVC )
67 include(config-ix)
7468
7569 set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_TOOLS_BINARY_DIR} )
7670 set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib )
2222 check_include_file(stdint.h HAVE_STDINT_H)
2323 check_include_file(stdio.h HAVE_STDIO_H)
2424 check_include_file(stdlib.h HAVE_STDLIB_H)
25 check_include_file(string.h HAVE_STRING_H)
2526 check_include_file(sys/dir.h HAVE_SYS_DIR_H)
2627 check_include_file(sys/dl.h HAVE_SYS_DL_H)
2728 check_include_file(sys/mman.h HAVE_SYS_MMAN_H)
3334 check_include_file(sys/types.h HAVE_SYS_TYPES_H)
3435 check_include_file(unistd.h HAVE_UNISTD_H)
3536 check_include_file(utime.h HAVE_UTIME_H)
37 check_include_file(windows.h HAVE_WINDOWS_H)
3638
3739 # function checks
3840 include(CheckSymbolExists)
4345 check_symbol_exists(isinf math.h HAVE_ISINF_IN_MATH_H)
4446 check_symbol_exists(isnan cmath HAVE_ISNAN_IN_CMATH)
4547 check_symbol_exists(isnan math.h HAVE_ISNAN_IN_MATH_H)
48 check_symbol_exists(ceilf math.h HAVE_CEILF)
49 check_symbol_exists(floorf math.h HAVE_FLOORF)
4650 check_symbol_exists(mallinfo malloc.h HAVE_MALLINFO)
4751 check_symbol_exists(pthread_mutex_lock pthread.h HAVE_PTHREAD_MUTEX_LOCK)
52 check_symbol_exists(strtoll stdlib.h HAVE_STRTOLL)
4853
4954 if( MINGW )
5055 # tbi: Comprobar que existen las librerias:
5459 # CHECK_LIBRARY_EXISTS(imagehlp ??? . HAVE_LIBIMAGEHLP)
5560 endif( MINGW )
5661
57 # Classes
58 include(CheckCxxHashmap)
59 include(CheckCxxHashset)
60 check_hashmap()
61 check_hashset()
62 if( MSVC )
63 set(error_t int)
64 set(LTDL_SHLIBPATH_VAR "PATH")
65 set(LTDL_SYSSEARCHPATH "")
66 set(LTDL_DLOPEN_DEPLIBS 1)
67 set(SHLIBEXT ".lib")
68 set(LTDL_OBJDIR "_libs")
69 set(HAVE_STRTOLL 1)
70 set(strtoll "_strtoi64")
71 set(strtoull "_strtoui64")
72 set(stricmp "_stricmp")
73 set(strdup "_strdup")
74 else( MSVC )
75 set(LTDL_SHLIBPATH_VAR "LD_LIBRARY_PATH")
76 set(LTDL_SYSSEARCHPATH "") # TODO
77 set(LTDL_DLOPEN_DEPLIBS 0) # TODO
78 endif( MSVC )
79
80 if( NOT MSVC )
81 # hash_map.h.in and hash_set.h.in contain a special case for MSVC
82 include(CheckCxxHashmap)
83 include(CheckCxxHashset)
84 check_hashmap()
85 check_hashset()
86 endif( NOT MSVC )
6287
6388 # FIXME: Signal handler return type, currently hardcoded to 'void'
6489 set(RETSIGTYPE void)
+0
-9
cmake/config-w32.cmake less more
None # tbi: Configurar ficheros.
1 configure_file(${llvm_include_path}/llvm/ADT/hash_map.h.in ${llvm_builded_incs_dir}/ADT/hash_map.h COPYONLY)
2 configure_file(${llvm_include_path}/llvm/ADT/hash_set.h.in ${llvm_builded_incs_dir}/ADT/hash_set.h COPYONLY)
3 configure_file(${llvm_include_path}/llvm/ADT/iterator.h.in ${llvm_builded_incs_dir}/ADT/iterator.h COPYONLY)
4 configure_file(${llvm_include_path}/llvm/Support/DataTypes.h.in ${llvm_builded_incs_dir}/Support/DataTypes.h COPYONLY)
5 configure_file(${llvm_include_path}/llvm/Config/config.h.in ${llvm_builded_incs_dir}/Config/config.h COPYONLY)
6
7 file(READ ${llvm_include_path}/../win32/config.h vc_config_text)
8 file(APPEND ${llvm_builded_incs_dir}/Config/config.h ${vc_config_text})
6060 #undef HAVE_BI_ITERATOR
6161
6262 /* Define to 1 if you have the `ceilf' function. */
63 #undef HAVE_CEILF
63 #cmakedefine HAVE_CEILF ${HAVE_CEILF}
6464
6565 /* Define to 1 if you have the `closedir' function. */
6666 #undef HAVE_CLOSEDIR
115115 #undef HAVE_FINITE_IN_IEEEFP_H
116116
117117 /* Define to 1 if you have the `floorf' function. */
118 #undef HAVE_FLOORF
118 #cmakedefine HAVE_FLOORF ${HAVE_FLOORF}
119119
120120 /* Does not have forward iterator */
121121 #undef HAVE_FWD_ITERATOR
366366 #undef HAVE_STRINGS_H
367367
368368 /* Define to 1 if you have the header file. */
369 #undef HAVE_STRING_H
369 #cmakedefine HAVE_STRING_H ${HAVE_STRING_H}
370370
371371 /* Define to 1 if you have the `strrchr' function. */
372372 #undef HAVE_STRRCHR
373373
374374 /* Define to 1 if you have the `strtoll' function. */
375 #undef HAVE_STRTOLL
375 #cmakedefine HAVE_STRTOLL ${HAVE_STRTOLL}
376376
377377 /* Define to 1 if you have the `strtoq' function. */
378378 #undef HAVE_STRTOQ
425425 #undef HAVE_U_INT64_T
426426
427427 /* Define to 1 if you have the header file. */
428 #undef HAVE_WINDOWS_H
428 #cmakedefine HAVE_WINDOWS_H ${HAVE_WINDOWS_H}
429429
430430 /* Installation directory for binary executables */
431431 #undef LLVM_BINDIR
476476 #undef LLVM_PREFIX
477477
478478 /* Define if the OS needs help to load dependent libraries for dlopen(). */
479 #undef LTDL_DLOPEN_DEPLIBS
479 #cmakedefine LTDL_DLOPEN_DEPLIBS ${LTDL_DLOPEN_DEPLIBS}
480480
481481 /* Define to the sub-directory in which libtool stores uninstalled libraries.
482482 */
484484
485485 /* Define to the name of the environment variable that determines the dynamic
486486 library search path. */
487 #undef LTDL_SHLIBPATH_VAR
487 #cmakedefine LTDL_SHLIBPATH_VAR "${LTDL_SHLIBPATH_VAR}"
488488
489489 /* Define to the extension used for shared libraries, say, ".so". */
490490 #cmakedefine LTDL_SHLIB_EXT "${LTDL_SHLIB_EXT}"
491491
492492 /* Define to the system default library search path. */
493 #undef LTDL_SYSSEARCHPATH
493 #cmakedefine LTDL_SYSSEARCHPATH "${LTDL_SYSSEARCHPATH}"
494494
495495 /* Define if /dev/zero should be used when mapping RWX memory, or undefine if
496496 its not necessary */
548548 #undef const
549549
550550 /* Define to a type to use for `error_t' if it is not otherwise available. */
551 #undef error_t
551 #cmakedefine error_t ${error_t}
552552
553553 /* Define to `int' if does not define. */
554554 #undef pid_t
555555
556556 /* Define to `unsigned int' if does not define. */
557557 #undef size_t
558
559 /* Define to a function replacing strtoll */
560 #cmakedefine strtoll ${strtoll}
561
562 /* Define to a function implementing strtoull */
563 #cmakedefine strtoull ${strtoull}
564
565 /* Define to a function implementing stricmp */
566 #cmakedefine stricmp ${stricmp}
567
568 /* Define to a function implementing strdup */
569 #cmakedefine strdup ${strdup}