diff options
author | KWSys Robot <kwrobot@kitware.com> | 2013-11-21 17:47:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-11-25 16:19:37 (GMT) |
commit | 704ab3d24827cfe5754a00028086f21503c2e08b (patch) | |
tree | 7055b7ac99385d358c90b9fed3b2c3b622c4a8bc /CMakeLists.txt | |
parent | c01e74459c0ad5552f8b5fc384bc540d82c32c60 (diff) | |
download | CMake-704ab3d24827cfe5754a00028086f21503c2e08b.zip CMake-704ab3d24827cfe5754a00028086f21503c2e08b.tar.gz CMake-704ab3d24827cfe5754a00028086f21503c2e08b.tar.bz2 |
KWSys 2013-11-21 (1010d0e3)
Extract upstream KWSys using the following shell commands.
$ git archive --prefix=upstream-kwsys/ 1010d0e3 | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' 6eab64c3..1010d0e3
Brad King (2):
ace1364c Encoding: Remove unused include
1010d0e3 SystemTools: Avoid unused function warnings
Clinton Stimpson (4):
0c2ff1f7 Encoding: Add Encoding module.
8abbad82 FStream: Add FStream module.
0a98de97 KWSys: Port to use wide character Windows APIs throughout.
2b0c683d Encoding: Default to ANSI code page on Windows
David Cole (1):
f67bb2ba SystemTools: Move typedef mode_t inside the SystemTools class
Sean McBride (1):
a40b9263 SystemInformation: Work around gcc -Wliteral-suffix warning
Change-Id: Ie52df972331cc7377c236d410ead86024e9d15ab
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 58 |
1 files changed, 52 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f27836..c2b377d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,6 +112,7 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) SET(KWSYS_USE_Base64 1) SET(KWSYS_USE_Directory 1) SET(KWSYS_USE_DynamicLoader 1) + SET(KWSYS_USE_Encoding 1) SET(KWSYS_USE_Glob 1) SET(KWSYS_USE_MD5 1) SET(KWSYS_USE_Process 1) @@ -122,6 +123,7 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) SET(KWSYS_USE_FundamentalType 1) SET(KWSYS_USE_Terminal 1) SET(KWSYS_USE_IOStream 1) + SET(KWSYS_USE_FStream 1) SET(KWSYS_USE_String 1) SET(KWSYS_USE_SystemInformation 1) SET(KWSYS_USE_CPU 1) @@ -130,18 +132,32 @@ ENDIF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) # Enforce component dependencies. IF(KWSYS_USE_SystemTools) SET(KWSYS_USE_Directory 1) + SET(KWSYS_USE_FStream 1) + SET(KWSYS_USE_Encoding 1) ENDIF(KWSYS_USE_SystemTools) IF(KWSYS_USE_Glob) SET(KWSYS_USE_Directory 1) SET(KWSYS_USE_SystemTools 1) SET(KWSYS_USE_RegularExpression 1) + SET(KWSYS_USE_FStream 1) + SET(KWSYS_USE_Encoding 1) ENDIF(KWSYS_USE_Glob) IF(KWSYS_USE_Process) SET(KWSYS_USE_System 1) + SET(KWSYS_USE_Encoding 1) ENDIF(KWSYS_USE_Process) IF(KWSYS_USE_SystemInformation) SET(KWSYS_USE_Process 1) ENDIF(KWSYS_USE_SystemInformation) +IF(KWSYS_USE_System) + SET(KWSYS_USE_Encoding 1) +ENDIF(KWSYS_USE_System) +IF(KWSYS_USE_Directory) + SET(KWSYS_USE_Encoding 1) +ENDIF(KWSYS_USE_Directory) +IF(KWSYS_USE_FStream) + SET(KWSYS_USE_Encoding 1) +ENDIF(KWSYS_USE_FStream) # Setup the large file support default. IF(KWSYS_LFS_DISABLE) @@ -150,6 +166,11 @@ ELSE(KWSYS_LFS_DISABLE) SET(KWSYS_LFS_REQUESTED 1) ENDIF(KWSYS_LFS_DISABLE) +# Specify default 8 bit encoding for Windows +IF(NOT KWSYS_ENCODING_DEFAULT_CODEPAGE) + SET(KWSYS_ENCODING_DEFAULT_CODEPAGE CP_ACP) +ENDIF(NOT KWSYS_ENCODING_DEFAULT_CODEPAGE) + # Enable testing if building standalone. IF(KWSYS_STANDALONE) INCLUDE(Dart) @@ -506,6 +527,12 @@ IF(KWSYS_USE_FundamentalType) "Checking whether char is signed" DIRECT) ENDIF(KWSYS_USE_FundamentalType) +IF(KWSYS_USE_Encoding) + # Look for type size helper macros. + KWSYS_PLATFORM_CXX_TEST(KWSYS_STL_HAS_WSTRING + "Checking whether wstring is available" DIRECT) +ENDIF(KWSYS_USE_Encoding) + IF(KWSYS_USE_IOStream) # Determine whether iostreams support long long. SET(KWSYS_PLATFORM_CXX_TEST_DEFINES @@ -861,8 +888,8 @@ SET(KWSYS_HXX_FILES Configure String # Add selected C++ classes. SET(cppclasses - Directory DynamicLoader Glob RegularExpression SystemTools - CommandLineArguments IOStream SystemInformation + Directory DynamicLoader Encoding Glob RegularExpression SystemTools + CommandLineArguments IOStream FStream SystemInformation ) FOREACH(cpp ${cppclasses}) IF(KWSYS_USE_${cpp}) @@ -878,7 +905,7 @@ ENDFOREACH(cpp) # Add selected C components. FOREACH(c - Process Base64 FundamentalType MD5 Terminal System String CPU + Process Base64 Encoding FundamentalType MD5 Terminal System String CPU ) IF(KWSYS_USE_${c}) # Use the corresponding header file. @@ -909,16 +936,24 @@ IF(KWSYS_USE_Process) ENDIF(KWSYS_USE_Process) # Add selected C sources. -FOREACH(c Base64 MD5 Terminal System String) +FOREACH(c Base64 Encoding MD5 Terminal System String) IF(KWSYS_USE_${c}) - SET(KWSYS_C_SRCS ${KWSYS_C_SRCS} ${c}.c) + IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${c}C.c) + LIST(APPEND KWSYS_C_SRCS ${c}C.c) + ELSE() + LIST(APPEND KWSYS_C_SRCS ${c}.c) + ENDIF() ENDIF(KWSYS_USE_${c}) ENDFOREACH(c) # Configure headers of C++ classes and construct the list of sources. FOREACH(c ${KWSYS_CLASSES}) # Add this source to the list of source files for the library. - SET(KWSYS_CXX_SRCS ${KWSYS_CXX_SRCS} ${c}.cxx) + IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${c}CXX.cxx) + LIST(APPEND KWSYS_CXX_SRCS ${c}CXX.cxx) + ELSEIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${c}.cxx) + LIST(APPEND KWSYS_CXX_SRCS ${c}.cxx) + ENDIF() # Configure the header for this class. CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/${c}.hxx.in ${KWSYS_HEADER_DIR}/${c}.hxx @@ -1044,6 +1079,12 @@ IF(KWSYS_USE_String) COMPILE_FLAGS "-DKWSYS_STRING_C") ENDIF(KWSYS_USE_String) +IF(KWSYS_USE_Encoding) + # Set default 8 bit encoding in "EndcodingC.c". + SET_PROPERTY(SOURCE EncodingC.c APPEND PROPERTY COMPILE_DEFINITIONS + KWSYS_ENCODING_DEFAULT_CODEPAGE=${KWSYS_ENCODING_DEFAULT_CODEPAGE}) +ENDIF(KWSYS_USE_Encoding) + #----------------------------------------------------------------------------- # Setup testing if not being built as part of another project. IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) @@ -1087,6 +1128,11 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR) testCommandLineArguments testCommandLineArguments1 ) + IF(KWSYS_STL_HAS_WSTRING) + SET(KWSYS_CXX_TESTS ${KWSYS_CXX_TESTS} + testEncoding + ) + ENDIF(KWSYS_STL_HAS_WSTRING) IF(KWSYS_USE_SystemInformation) SET(KWSYS_CXX_TESTS ${KWSYS_CXX_TESTS} testSystemInformation) ENDIF(KWSYS_USE_SystemInformation) |