Hi Peter,

I agree, we need your/our changes at  upstream!

I will switch to our github:

https://github.com/syntheticpp/ninja


On little more about ninja bootstrap:
Original bootstrap.py generated target rule:
ninja -t clean
does a really distclean. The re2c generted files are removed too!

To be save, I added a rule to build/update them if needed:

#####################################
set (RE2C_FOUND FALSE)
find_program (RE2C_EXECUTABLE "re2c")
if (RE2C_EXECUTABLE)
    set (RE2C_FOUND TRUE)
    set (RE2C_FLAGS -b -i --no-generation-date)

    # build src/depfile_parser.cc: re2c src/depfile_parser.in.cc
    # build src/lexer.cc: re2c src/lexer.in.cc
    foreach(_in depfile_parser.in.cc lexer.in.cc)
        string(REGEX REPLACE ".in.cc" ".cc" _out "${_in}")
        message(STATUS "Generate re2c src/${_in} -o src/${_out}")

# CMake atrocity: if none of these OUTPUT files is used in a target in # the current CMakeLists.txt file, the ADD_CUSTOM_COMMAND is plainly
         # ignored and left out of the make files.
        add_custom_command(OUTPUT ${srcdir}/${_out}
COMMAND ${RE2C_EXECUTABLE} ${${RE2C_FLAGS}} -o ${srcdir}/$ {_out} ${srcdir}/${_in}
            DEPENDS ${srcdir}/${_in}
        )
    endforeach()
endif (RE2C_EXECUTABLE)
########################################

claus-kleins-macbook-pro:build clausklein$ ninja -d explain
ninja: no work to do.
claus-kleins-macbook-pro:build clausklein$ touch ../src/lexer.in.cc
claus-kleins-macbook-pro:build clausklein$ ninja -d explain
ninja explain: restat of output ../src/lexer.cc older than inputs
ninja explain: ../src/lexer.cc is dirty
ninja explain: ../src/lexer.cc is dirty
ninja explain: CMakeFiles/ninja_lib.dir/src/lexer.cc.o is dirty
ninja explain: libninja_lib.a is dirty
ninja explain: ninja is dirty
ninja explain: libninja_lib.a is dirty
[4/4] Linking CXX executable ninja
claus-kleins-macbook-pro:build clausklein$

//Regards
Claus



On 08.06.2012, at 23:13, Peter Kümmel wrote:

Will it merged later?
Can you please apply my time-stamp patch?

More interesting would be to bring it upstream.


P.S.
I tried to compile it with your CMakeLists.txt file, but it needs love on linux (UNIX) build hosts.

Oh, yes, thanks. The last day I'm only on windows.


//Regards
Claus



--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to