[cmake-commits] hoffman committed CMakeLists.txt NONE 1.1 foo.cxx NONE 1.1

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Dec 6 23:05:12 EST 2006


Update of /cvsroot/CMake/CMake/Tests/CustComDepend
In directory public:/mounts/ram/cvs-serv7974/Tests/CustComDepend

Added Files:
	CMakeLists.txt foo.cxx 
Log Message:
ENH: fix bug in full path to target depends stuff


--- NEW FILE: CMakeLists.txt ---
project(CustComDepend)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE=1)
set(EXECUTABLE_OUTPUT_PATH ${CustComDepend_BINARY_DIR}/bin)
add_executable(foo foo.cxx)
add_custom_command(
  OUTPUT ${CustComDepend_BINARY_DIR}/bar.c
  COMMAND ${CustComDepend_BINARY_DIR}/bin/foo ${CustComDepend_BINARY_DIR}/bar.c
  DEPENDS ${CustComDepend_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/foo
)
  
add_library(bar SHARED ${CustComDepend_BINARY_DIR}/bar.c)

--- NEW FILE: foo.cxx ---
#include <stdio.h>

int main(int ac, char** av)
{
  FILE* fout = fopen(av[1], "w");
  printf("create %s\n", av[1]);
  if(!fout)
    {
    return -1;
    }
  fprintf(fout, "int bar(){ return 10;}\n");
  fclose(fout);
  return 0;
}
  



More information about the Cmake-commits mailing list