[Cmake-commits] [cmake-commits] hoffman committed CMakeLists.txt 1.36.2.3 1.36.2.4 foo.in 1.3.10.1 1.3.10.2 gen_once.c.in 1.1.2.2 NONE wrapper.cxx 1.5 1.5.12.1
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Jun 13 08:55:21 EDT 2008
Update of /cvsroot/CMake/CMake/Tests/CustomCommand
In directory public:/mounts/ram/cvs-serv21498/Tests/CustomCommand
Modified Files:
Tag: CMake-2-6
CMakeLists.txt foo.in wrapper.cxx
Removed Files:
Tag: CMake-2-6
gen_once.c.in
Log Message:
ENH: merge in changes from head
Index: foo.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CustomCommand/foo.in,v
retrieving revision 1.3.10.1
retrieving revision 1.3.10.2
diff -C 2 -d -r1.3.10.1 -r1.3.10.2
*** foo.in 15 May 2008 19:40:01 -0000 1.3.10.1
--- foo.in 13 Jun 2008 12:55:19 -0000 1.3.10.2
***************
*** 7,15 ****
int generated();
int wrapped();
- int gen_once(void);
int main ()
{
! if (generated()*wrapped()*doc()*gen_once() == 3*5*7*11)
{
FILE* fin = fopen(PROJECT_BINARY_DIR "/not_included.h", "r");
--- 7,14 ----
int generated();
int wrapped();
int main ()
{
! if (generated()*wrapped()*doc() == 3*5*7)
{
FILE* fin = fopen(PROJECT_BINARY_DIR "/not_included.h", "r");
--- gen_once.c.in DELETED ---
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CustomCommand/CMakeLists.txt,v
retrieving revision 1.36.2.3
retrieving revision 1.36.2.4
diff -C 2 -d -r1.36.2.3 -r1.36.2.4
*** CMakeLists.txt 15 May 2008 19:40:01 -0000 1.36.2.3
--- CMakeLists.txt 13 Jun 2008 12:55:18 -0000 1.36.2.4
***************
*** 43,46 ****
--- 43,48 ----
COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/wrapper
${PROJECT_BINARY_DIR}/wrapped.c ${PROJECT_BINARY_DIR}/wrapped_help.c
+ ${CMAKE_CFG_INTDIR} # this argument tests passing of the configuration
+ VERBATIM # passing of configuration should work in this mode
)
***************
*** 152,163 ****
${PROJECT_BINARY_DIR}/not_included.h
gen_redirect.c # default location for custom commands is in build tree
- gen_once.c
- )
-
- # Add a rule with no dependencies.
- ADD_CUSTOM_COMMAND(
- OUTPUT gen_once.c
- COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/gen_once.c.in ${PROJECT_BINARY_DIR}/gen_once.c
- SKIP_RULE_DEPENDS
)
--- 154,157 ----
Index: wrapper.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CustomCommand/wrapper.cxx,v
retrieving revision 1.5
retrieving revision 1.5.12.1
diff -C 2 -d -r1.5 -r1.5.12.1
*** wrapper.cxx 13 Apr 2006 19:28:57 -0000 1.5
--- wrapper.cxx 13 Jun 2008 12:55:19 -0000 1.5.12.1
***************
*** 1,3 ****
--- 1,4 ----
#include <stdio.h>
+ #include <string.h>
int main(int argc, char *argv[])
***************
*** 15,18 ****
--- 16,36 ----
fprintf(fp,"int wrapped_help() { return 5; }\n");
fclose(fp);
+ #ifdef CMAKE_INTDIR
+ /* The VS6 IDE passes a leading ".\\" in its variable expansion. */
+ # if defined(_MSC_VER) && _MSC_VER == 1200
+ # define CFG_DIR ".\\" CMAKE_INTDIR
+ # else
+ # define CFG_DIR CMAKE_INTDIR
+ # endif
+ const char* cfg = (argc >= 4)? argv[3] : "";
+ if(strcmp(cfg, CFG_DIR) != 0)
+ {
+ fprintf(stderr,
+ "Did not receive expected configuration argument:\n"
+ " expected [" CFG_DIR "]\n"
+ " received [%s]\n", cfg);
+ return 1;
+ }
+ #endif
return 0;
}
More information about the Cmake-commits
mailing list