[Cmake-commits] [cmake-commits] hoffman committed CMakeLists.txt 1.9.2.1 1.9.2.2 preprocess.c 1.2 1.2.2.1 preprocess.cxx 1.2 1.2.2.1

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Mar 27 11:56:56 EDT 2009


Update of /cvsroot/CMake/CMake/Tests/Preprocess
In directory public:/mounts/ram/cvs-serv3695/Tests/Preprocess

Modified Files:
      Tag: CMake-2-6
	CMakeLists.txt preprocess.c preprocess.cxx 
Log Message:
ENH: merge in from main tree to create RC 2


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/Preprocess/CMakeLists.txt,v
retrieving revision 1.9.2.1
retrieving revision 1.9.2.2
diff -C 2 -d -r1.9.2.1 -r1.9.2.2
*** CMakeLists.txt	24 Mar 2008 22:23:26 -0000	1.9.2.1
--- CMakeLists.txt	27 Mar 2009 15:56:48 -0000	1.9.2.2
***************
*** 66,77 ****
  endif(NOT BORLAND AND NOT PP_VS70)
  
! if(NOT PP_BORLAND AND NOT PP_WATCOM)
!   # Borland, WMake: multiple spaces
!   # The make tool seems to remove extra whitespace from inside
!   # quoted strings when passing to the compiler.  It does not have
!   # trouble passing to other tools, and the compiler may be directly
!   # invoked from the command line.
!   set(STRING_EXTRA "${STRING_EXTRA}  ")
! endif(NOT PP_BORLAND AND NOT PP_WATCOM)
  
  if(NOT PP_VS)
--- 66,83 ----
  endif(NOT BORLAND AND NOT PP_VS70)
  
! if(NOT PP_VS6)
!   # VS 6 IDE: spaces
!   # The project parser unconditionally separates arguments at spaces.
!   set(STRING_EXTRA "${STRING_EXTRA} ")
! 
!   if(NOT PP_BORLAND AND NOT PP_WATCOM)
!     # Borland, WMake: multiple spaces
!     # The make tool seems to remove extra whitespace from inside
!     # quoted strings when passing to the compiler.  It does not have
!     # trouble passing to other tools, and the compiler may be directly
!     # invoked from the command line.
!     set(STRING_EXTRA "${STRING_EXTRA} ")
!   endif(NOT PP_BORLAND AND NOT PP_WATCOM)
! endif(NOT PP_VS6)
  
  if(NOT PP_VS)
***************
*** 153,157 ****
  
  # Compose the final test string.
! set(STRING_VALUE "hello `~!@$*)(_+-=}{][:'.?/ ${STRING_EXTRA}world")
  
  #-----------------------------------------------------------------------------
--- 159,163 ----
  
  # Compose the final test string.
! set(STRING_VALUE "hello`~!@$*)(_+-=}{][:'.?/${STRING_EXTRA}world")
  
  #-----------------------------------------------------------------------------
***************
*** 195,203 ****
  
  # Make sure old-style definitions are converted to directory property.
! if(PREPROCESS_VS6)
!   set(OLD_DEFS_EXPECTED "OLD_DEF")
! else(PREPROCESS_VS6)
!   set(OLD_DEFS_EXPECTED "OLD_DEF;OLD_EXPR=2")
! endif(PREPROCESS_VS6)
  get_property(OLD_DEFS DIRECTORY PROPERTY COMPILE_DEFINITIONS)
  if(NOT "${OLD_DEFS}" STREQUAL "${OLD_DEFS_EXPECTED}")
--- 201,205 ----
  
  # Make sure old-style definitions are converted to directory property.
! set(OLD_DEFS_EXPECTED "OLD_DEF;OLD_EXPR=2")
  get_property(OLD_DEFS DIRECTORY PROPERTY COMPILE_DEFINITIONS)
  if(NOT "${OLD_DEFS}" STREQUAL "${OLD_DEFS_EXPECTED}")
***************
*** 226,246 ****
  endforeach(c)
  
! # Add definitions with values.  VS6 does not support this.
  if(NOT PREPROCESS_VS6)
!   set_property(
!     TARGET Preprocess
!     APPEND PROPERTY COMPILE_DEFINITIONS
!     "TARGET_STRING=\"${STRING_VALUE}${SEMICOLON}\""
!     "TARGET_EXPR=${EXPR}"
!     "TARGET_PATH=\"${TARGET_PATH}\""
!     )
!   set_property(
!     SOURCE preprocess.c preprocess${VS6}.cxx
!     APPEND PROPERTY COMPILE_DEFINITIONS
!     "FILE_STRING=\"${STRING_VALUE}${SEMICOLON}\""
!     "FILE_EXPR=${EXPR}"
!     "FILE_PATH=\"${FILE_PATH}\""
!     )
  endif(NOT PREPROCESS_VS6)
  
  # Helper target for running test manually in build tree.
--- 228,251 ----
  endforeach(c)
  
! # Add definitions with values.
  if(NOT PREPROCESS_VS6)
!   # The path might have spaces, which VS6 does not support.
!   set(DEF_TARGET_PATH "TARGET_PATH=\"${TARGET_PATH}\"")
!   set(DEF_FILE_PATH "FILE_PATH=\"${FILE_PATH}\"")
  endif(NOT PREPROCESS_VS6)
+ set_property(
+   TARGET Preprocess
+   APPEND PROPERTY COMPILE_DEFINITIONS
+   "TARGET_STRING=\"${STRING_VALUE}${SEMICOLON}\""
+   "TARGET_EXPR=${EXPR}"
+   ${DEF_TARGET_PATH}
+   )
+ set_property(
+   SOURCE preprocess.c preprocess${VS6}.cxx
+   APPEND PROPERTY COMPILE_DEFINITIONS
+   "FILE_STRING=\"${STRING_VALUE}${SEMICOLON}\""
+   "FILE_EXPR=${EXPR}"
+   ${DEF_FILE_PATH}
+   )
  
  # Helper target for running test manually in build tree.

Index: preprocess.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/Preprocess/preprocess.cxx,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C 2 -d -r1.2 -r1.2.2.1
*** preprocess.cxx	18 Jan 2008 00:29:43 -0000	1.2
--- preprocess.cxx	27 Mar 2009 15:56:53 -0000	1.2.2.1
***************
*** 12,16 ****
  {
    int result = 1;
- #ifndef PREPROCESS_VS6
    if(strcmp(FILE_STRING, STRING_VALUE) != 0)
      {
--- 12,15 ----
***************
*** 41,45 ****
      }
    }
- #endif
  #ifdef NDEBUG
  # ifdef FILE_DEF_DEBUG
--- 40,43 ----

Index: preprocess.c
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/Preprocess/preprocess.c,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C 2 -d -r1.2 -r1.2.2.1
*** preprocess.c	18 Jan 2008 00:29:43 -0000	1.2
--- preprocess.c	27 Mar 2009 15:56:51 -0000	1.2.2.1
***************
*** 10,14 ****
  {
    int result = 1;
- #ifndef PREPROCESS_VS6
    if(strcmp(FILE_STRING, STRING_VALUE) != 0)
      {
--- 10,13 ----
***************
*** 39,43 ****
      }
    }
- #endif
  #ifdef NDEBUG
  # ifdef FILE_DEF_DEBUG
--- 38,41 ----



More information about the Cmake-commits mailing list