[CMake] Add new suffix rules

Lorensen, William E (GE, Research) lorensen at crd.ge.com
Mon Apr 17 11:50:29 EDT 2006


Bill,
Almost... I had to add:
   SET_SOURCE_FILES_PROPERTIES(${TMP_FILENAME}.cxx PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${TMP_FILENAME}.clp)

It worked without this SET_SOURCE_FILES_PROPERTIES for Visual 7, but not Borland.

Thanks,

Bill

-----Original Message-----
From: cmake-bounces+lorensen=crd.ge.com at cmake.org
[mailto:cmake-bounces+lorensen=crd.ge.com at cmake.org]On Behalf Of William
A. Hoffman
Sent: Monday, April 17, 2006 11:07 AM
To: Lorensen, William E (GE, Research); Bill Lorensen; cmake at cmake.org
Subject: RE: [CMake] Add new suffix rules


At 09:50 AM 4/17/2006, Lorensen, William E (GE, Research) wrote:
>It has C++ code snippets in it. I #include in a C++ program. BTW, my code works for Visual Studio 7. It fails on Borland and linux.

This should work:

ADD_CUSTOM_COMMAND(
      OUTPUT ${TMP_FILENAME}.clp
          DEPENDS GenerateCLP ${TMP_INPUT}
          COMMAND ${GENERATECLP_EXE}
          ${TMP_INPUT} ${CMAKE_CURRENT_SOURCE_DIR}/${TMP_FILENAME}.clp
          )
# mark the .clp file as a header file
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/${TMP_FILENAME}.clp PROPERTIES HEADER_FILE_ONLY TRUE)


However, I am thinking that this should not be an error, and will look into
fixing the code.

-Bill

_______________________________________________
CMake mailing list
CMake at cmake.org
http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list