[CMake] Visual Studio 2010

J Decker d3ck0r at gmail.com
Fri Apr 2 00:41:55 EDT 2010


That reminds me, can ${PROJECT_NAME} contain slashes?  and if so,
could it just put the content in that folder path in the project?

On Wed, Mar 31, 2010 at 3:07 AM, elizabeta petreska
<elizabeta.petreska at gmail.com> wrote:
> Hello
>
> I am using cmake 2.8 to generate Visual Studio 2010 solution files.
>
> I have the following cmakelists.txt :
>
> set(PROJECT_NAME Test2)
> PROJECT(${PROJECT_NAME})
>
> FILE(GLOB Test_SRCS
>  main.cpp
>   )
>
>
> ADD_EXECUTABLE(${PROJECT_NAME}
>   ${Test_SRCS}
> )
>
>
> ADD_CUSTOM_COMMAND (OUTPUT "$(ConfigurationName)/Foo.txt"
>        COMMAND echo Foo >  "$(ConfigurationName)/Foo.txt"
>        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/myfile.txt
> )
>  ADD_CUSTOM_TARGET (Foo DEPENDS "$(ConfigurationName)/Foo.txt")
>  ADD_DEPENDENCIES(${PROJECT_NAME} Foo)
>
> The problem is that Foo.txt is generated on every build on the solution
> although myfile.txt is not changed.
>
>
>
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>


More information about the CMake mailing list