[llvm-commits] [llvm] r58132 - in /llvm/trunk: CMakeLists.txt cmake/config-ix.cmake cmake/config-w32.cmake include/llvm/Config/config.h.cmake
Oscar Fuentes
ofv at wanadoo.es
Fri Oct 24 20:29:37 PDT 2008
Author: ofv
Date: Fri Oct 24 22:29:36 2008
New Revision: 58132
URL: http://llvm.org/viewvc/llvm-project?rev=58132&view=rev
Log:
CMake: MSVC++ no longer uses a special configuration method.
Removed:
llvm/trunk/cmake/config-w32.cmake
Modified:
llvm/trunk/CMakeLists.txt
llvm/trunk/cmake/config-ix.cmake
llvm/trunk/include/llvm/Config/config.h.cmake
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=58132&r1=58131&r2=58132&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Fri Oct 24 22:29:36 2008
@@ -65,13 +65,7 @@
# find_file(HAVE_LLVM_CONFIG llvm-config ${LLVM_TOOLS_BINARY_DIR})
# message(STATUS ${HAVE_LLVM_CONFIG})
-if( MSVC )
- message(STATUS "Configuring using MSVC hack.")
- include(config-w32)
-else( MSVC )
- message(STATUS "Configuring traditional style.")
- include(config-ix)
-endif( MSVC )
+include(config-ix)
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_TOOLS_BINARY_DIR} )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib )
Modified: llvm/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/config-ix.cmake?rev=58132&r1=58131&r2=58132&view=diff
==============================================================================
--- llvm/trunk/cmake/config-ix.cmake (original)
+++ llvm/trunk/cmake/config-ix.cmake Fri Oct 24 22:29:36 2008
@@ -23,6 +23,7 @@
check_include_file(stdint.h HAVE_STDINT_H)
check_include_file(stdio.h HAVE_STDIO_H)
check_include_file(stdlib.h HAVE_STDLIB_H)
+check_include_file(string.h HAVE_STRING_H)
check_include_file(sys/dir.h HAVE_SYS_DIR_H)
check_include_file(sys/dl.h HAVE_SYS_DL_H)
check_include_file(sys/mman.h HAVE_SYS_MMAN_H)
@@ -34,6 +35,7 @@
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
check_include_file(unistd.h HAVE_UNISTD_H)
check_include_file(utime.h HAVE_UTIME_H)
+check_include_file(windows.h HAVE_WINDOWS_H)
# function checks
include(CheckSymbolExists)
@@ -44,8 +46,11 @@
check_symbol_exists(isinf math.h HAVE_ISINF_IN_MATH_H)
check_symbol_exists(isnan cmath HAVE_ISNAN_IN_CMATH)
check_symbol_exists(isnan math.h HAVE_ISNAN_IN_MATH_H)
+check_symbol_exists(ceilf math.h HAVE_CEILF)
+check_symbol_exists(floorf math.h HAVE_FLOORF)
check_symbol_exists(mallinfo malloc.h HAVE_MALLINFO)
check_symbol_exists(pthread_mutex_lock pthread.h HAVE_PTHREAD_MUTEX_LOCK)
+check_symbol_exists(strtoll stdlib.h HAVE_STRTOLL)
if( MINGW )
# tbi: Comprobar que existen las librerias:
@@ -55,11 +60,31 @@
# CHECK_LIBRARY_EXISTS(imagehlp ??? . HAVE_LIBIMAGEHLP)
endif( MINGW )
-# Classes
-include(CheckCxxHashmap)
-include(CheckCxxHashset)
-check_hashmap()
-check_hashset()
+if( MSVC )
+ set(error_t int)
+ set(LTDL_SHLIBPATH_VAR "PATH")
+ set(LTDL_SYSSEARCHPATH "")
+ set(LTDL_DLOPEN_DEPLIBS 1)
+ set(SHLIBEXT ".lib")
+ set(LTDL_OBJDIR "_libs")
+ set(HAVE_STRTOLL 1)
+ set(strtoll "_strtoi64")
+ set(strtoull "_strtoui64")
+ set(stricmp "_stricmp")
+ set(strdup "_strdup")
+else( MSVC )
+ set(LTDL_SHLIBPATH_VAR "LD_LIBRARY_PATH")
+ set(LTDL_SYSSEARCHPATH "") # TODO
+ set(LTDL_DLOPEN_DEPLIBS 0) # TODO
+endif( MSVC )
+
+if( NOT MSVC )
+ # hash_map.h.in and hash_set.h.in contain a special case for MSVC
+ include(CheckCxxHashmap)
+ include(CheckCxxHashset)
+ check_hashmap()
+ check_hashset()
+endif( NOT MSVC )
# FIXME: Signal handler return type, currently hardcoded to 'void'
set(RETSIGTYPE void)
Removed: llvm/trunk/cmake/config-w32.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/config-w32.cmake?rev=58131&view=auto
==============================================================================
--- llvm/trunk/cmake/config-w32.cmake (original)
+++ llvm/trunk/cmake/config-w32.cmake (removed)
@@ -1,9 +0,0 @@
-# tbi: Configurar ficheros.
-configure_file(${llvm_include_path}/llvm/ADT/hash_map.h.in ${llvm_builded_incs_dir}/ADT/hash_map.h COPYONLY)
-configure_file(${llvm_include_path}/llvm/ADT/hash_set.h.in ${llvm_builded_incs_dir}/ADT/hash_set.h COPYONLY)
-configure_file(${llvm_include_path}/llvm/ADT/iterator.h.in ${llvm_builded_incs_dir}/ADT/iterator.h COPYONLY)
-configure_file(${llvm_include_path}/llvm/Support/DataTypes.h.in ${llvm_builded_incs_dir}/Support/DataTypes.h COPYONLY)
-configure_file(${llvm_include_path}/llvm/Config/config.h.in ${llvm_builded_incs_dir}/Config/config.h COPYONLY)
-
-file(READ ${llvm_include_path}/../win32/config.h vc_config_text)
-file(APPEND ${llvm_builded_incs_dir}/Config/config.h ${vc_config_text})
Modified: llvm/trunk/include/llvm/Config/config.h.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.cmake?rev=58132&r1=58131&r2=58132&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Config/config.h.cmake (original)
+++ llvm/trunk/include/llvm/Config/config.h.cmake Fri Oct 24 22:29:36 2008
@@ -61,7 +61,7 @@
#undef HAVE_BI_ITERATOR
/* Define to 1 if you have the `ceilf' function. */
-#undef HAVE_CEILF
+#cmakedefine HAVE_CEILF ${HAVE_CEILF}
/* Define to 1 if you have the `closedir' function. */
#undef HAVE_CLOSEDIR
@@ -116,7 +116,7 @@
#undef HAVE_FINITE_IN_IEEEFP_H
/* Define to 1 if you have the `floorf' function. */
-#undef HAVE_FLOORF
+#cmakedefine HAVE_FLOORF ${HAVE_FLOORF}
/* Does not have forward iterator */
#undef HAVE_FWD_ITERATOR
@@ -367,13 +367,13 @@
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
+#cmakedefine HAVE_STRING_H ${HAVE_STRING_H}
/* Define to 1 if you have the `strrchr' function. */
#undef HAVE_STRRCHR
/* Define to 1 if you have the `strtoll' function. */
-#undef HAVE_STRTOLL
+#cmakedefine HAVE_STRTOLL ${HAVE_STRTOLL}
/* Define to 1 if you have the `strtoq' function. */
#undef HAVE_STRTOQ
@@ -426,7 +426,7 @@
#undef HAVE_U_INT64_T
/* Define to 1 if you have the <windows.h> header file. */
-#undef HAVE_WINDOWS_H
+#cmakedefine HAVE_WINDOWS_H ${HAVE_WINDOWS_H}
/* Installation directory for binary executables */
#undef LLVM_BINDIR
@@ -477,7 +477,7 @@
#undef LLVM_PREFIX
/* Define if the OS needs help to load dependent libraries for dlopen(). */
-#undef LTDL_DLOPEN_DEPLIBS
+#cmakedefine LTDL_DLOPEN_DEPLIBS ${LTDL_DLOPEN_DEPLIBS}
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
@@ -485,13 +485,13 @@
/* Define to the name of the environment variable that determines the dynamic
library search path. */
-#undef LTDL_SHLIBPATH_VAR
+#cmakedefine LTDL_SHLIBPATH_VAR "${LTDL_SHLIBPATH_VAR}"
/* Define to the extension used for shared libraries, say, ".so". */
#cmakedefine LTDL_SHLIB_EXT "${LTDL_SHLIB_EXT}"
/* Define to the system default library search path. */
-#undef LTDL_SYSSEARCHPATH
+#cmakedefine LTDL_SYSSEARCHPATH "${LTDL_SYSSEARCHPATH}"
/* Define if /dev/zero should be used when mapping RWX memory, or undefine if
its not necessary */
@@ -549,10 +549,22 @@
#undef const
/* Define to a type to use for `error_t' if it is not otherwise available. */
-#undef error_t
+#cmakedefine error_t ${error_t}
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
+
+/* Define to a function replacing strtoll */
+#cmakedefine strtoll ${strtoll}
+
+/* Define to a function implementing strtoull */
+#cmakedefine strtoull ${strtoull}
+
+/* Define to a function implementing stricmp */
+#cmakedefine stricmp ${stricmp}
+
+/* Define to a function implementing strdup */
+#cmakedefine strdup ${strdup}
More information about the llvm-commits
mailing list