[Cmake-commits] [cmake-commits] hoffman committed CMakeLists.txt 1.4 1.5

cmake-commits at cmake.org cmake-commits at cmake.org
Sun Oct 4 22:55:04 EDT 2009


Update of /cvsroot/CMake/CMake/Tests/Tutorial/Step5/MathFunctions
In directory public:/mounts/ram/cvs-serv7553/MathFunctions

Modified Files:
	CMakeLists.txt 
Log Message:
Use new style header generation and get rid of OBJECT_DEPENDS in tutorial


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/Tutorial/Step5/MathFunctions/CMakeLists.txt,v
retrieving revision 1.4
retrieving revision 1.5
diff -C 2 -d -r1.4 -r1.5
*** CMakeLists.txt	13 Nov 2007 16:11:03 -0000	1.4
--- CMakeLists.txt	5 Oct 2009 02:55:02 -0000	1.5
***************
*** 1,25 ****
  # first we add the executable that generates the table
! add_executable(MakeTable MakeTable.cxx)
! 
! get_target_property(MakeTableLocation MakeTable LOCATION)
  
  # add the command to generate the source code
  add_custom_command (
    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Table.h
    DEPENDS MakeTable
-   COMMAND ${MakeTableLocation}
-   ARGS ${CMAKE_CURRENT_BINARY_DIR}/Table.h
    )
  
- set_source_files_properties (
-   mysqrt.cxx PROPERTIES 
-   OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Table.h
-   )
- 
- # add the binary tree directory to the search path for include files
- include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
- 
  # add the main library
! add_library(MathFunctions mysqrt.cxx)
  
  install (TARGETS MathFunctions DESTINATION bin)
--- 1,16 ----
  # first we add the executable that generates the table
! # add the binary tree directory to the search path for include files
! include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
  
+ add_executable(MakeTable MakeTable.cxx )
  # add the command to generate the source code
  add_custom_command (
    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Table.h
+   COMMAND MakeTable ${CMAKE_CURRENT_BINARY_DIR}/Table.h
    DEPENDS MakeTable
    )
  
  # add the main library
! add_library(MathFunctions mysqrt.cxx ${CMAKE_CURRENT_BINARY_DIR}/Table.h  )
  
  install (TARGETS MathFunctions DESTINATION bin)



More information about the Cmake-commits mailing list