[Cmake-commits] [cmake-commits] hoffman committed CMakeLists.txt 1.6 1.6.2.1 zot.cxx 1.2 1.2.2.1 zot_macro_dir.cxx NONE 1.1.2.2 zot_macro_tgt.cxx NONE 1.1.2.2
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu May 15 15:40:03 EDT 2008
Update of /cvsroot/CMake/CMake/Tests/BuildDepends/Project
In directory public:/mounts/ram/cvs-serv17340/Tests/BuildDepends/Project
Modified Files:
Tag: CMake-2-6
CMakeLists.txt zot.cxx
Added Files:
Tag: CMake-2-6
zot_macro_dir.cxx zot_macro_tgt.cxx
Log Message:
ENH: merge in from main tree
--- NEW FILE: zot_macro_dir.cxx ---
#define ZOT_DIR(x) <zot_##x##_dir.hxx>
#include ZOT_DIR(macro)
const char* zot_macro_dir_f()
{
return zot_macro_dir;
}
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/BuildDepends/Project/CMakeLists.txt,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C 2 -d -r1.6 -r1.6.2.1
*** CMakeLists.txt 21 Dec 2007 17:22:12 -0000 1.6
--- CMakeLists.txt 15 May 2008 19:40:01 -0000 1.6.2.1
***************
*** 1,2 ****
--- 1,3 ----
+ cmake_minimum_required(VERSION 2.6)
project(testRebuild)
add_library(foo STATIC ${testRebuild_BINARY_DIR}/foo.cxx)
***************
*** 58,61 ****
${CMAKE_CURRENT_BINARY_DIR}/zot_custom.hxx)
! add_executable(zot zot.cxx ${CMAKE_CURRENT_BINARY_DIR}/zot.hxx)
add_dependencies(zot zot_custom)
--- 59,74 ----
${CMAKE_CURRENT_BINARY_DIR}/zot_custom.hxx)
! add_executable(zot zot.cxx ${CMAKE_CURRENT_BINARY_DIR}/zot.hxx
! zot_macro_dir.cxx zot_macro_tgt.cxx)
add_dependencies(zot zot_custom)
+
+ # Test the #include line macro transformation rule support.
+ set_property(
+ TARGET zot
+ PROPERTY IMPLICIT_DEPENDS_INCLUDE_TRANSFORM "ZOT_TGT(%)=<zot_%_tgt.hxx>"
+ )
+
+ set_property(
+ DIRECTORY
+ PROPERTY IMPLICIT_DEPENDS_INCLUDE_TRANSFORM "ZOT_DIR(%)=<zot_%_dir.hxx>"
+ )
Index: zot.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/BuildDepends/Project/zot.cxx,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C 2 -d -r1.2 -r1.2.2.1
*** zot.cxx 21 Dec 2007 17:22:12 -0000 1.2
--- zot.cxx 15 May 2008 19:40:01 -0000 1.2.2.1
***************
*** 3,9 ****
#include <stdio.h>
int main()
{
! printf("[%s] [%s]\n", zot, zot_custom);
fflush(stdout);
return 0;
--- 3,13 ----
#include <stdio.h>
+ const char* zot_macro_dir_f();
+ const char* zot_macro_tgt_f();
+
int main()
{
! printf("[%s] [%s] [%s] [%s]\n", zot, zot_custom,
! zot_macro_dir_f(), zot_macro_tgt_f());
fflush(stdout);
return 0;
--- NEW FILE: zot_macro_tgt.cxx ---
#define ZOT_TGT(x) <zot_##x##_tgt.hxx>
#include ZOT_TGT(macro)
const char* zot_macro_tgt_f()
{
return zot_macro_tgt;
}
More information about the Cmake-commits
mailing list