Re: [CMake] a backwards compatible language simplification
/-- Around 10 PM on [05/18/06] ([EMAIL PROTECTED]) said -- That's nice already - changing 3 times the conditions in a if-else-endif construct was quite boring :-) Do you plan to also remove the parenthesis in a future release ? Gaetan My patch also made any unparenthesized cmake macro/function call FOO equivalent to the same call without any arguments FOO() This required some changes to the parser/scanner. I'd be happy to regenerate it off cvs trunk, if there's interest... I did run through all of the tests, but did not think through all possible corner cases. May be a devil somewhere down there in the details... For now though I'm just grateful that a portion of the patch was accepted :) -- [EMAIL PROTECTED] | of best value the perspectives http://docs.yahoo.com/info/values/ ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] a backwards compatible language simplification
Do you plan to also remove the parenthesis in a future release ? Gaetan My patch also made any unparenthesized cmake macro/function call FOO equivalent to the same call without any arguments FOO() This required some changes to the parser/scanner. I'd be happy to regenerate it off cvs trunk, if there's interest... I did run through I'm currently planning on leaving the parenthesis in. Some of the syntax highlighting modes for editors require it, it keeps the syntax simple, and once you type the () you really never have to change them. All pretty minor issues but then the benefit is fairly minor as well. I do want to support the same change as this for ENDMACRO since that is inconsistent right now in comparison to ENDIF, ENDWHILE, and ENDFOREACH. Ken ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] a backwards compatible language simplification
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ken Martin wrote: I incorporated some changes from Lloyd's patch and committed it to CVS. Basically if a project sets CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS on then you can leave off the arguments for the endif endwhile, else and endforeach commands. For example: What about ENDMACRO? if (FOO AND BAR) else () endif () The parenthesis are still required. I'm not sure what everyone's thoughts are on this but there it is... Ken - -- Filipe Sousa -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFEbh6QbQdNYqwwwCwRAsNfAJ0f+LMOVKt3dWC6Ifzzg5j0vWPczgCgnKyF 952YdiTtzU7qyi3jmsqyuEs= =Ly+R -END PGP SIGNATURE- ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] a backwards compatible language simplification
I incorporated some changes from Lloyd's patch and committed it to CVS. Basically if a project sets CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS on then you can leave off the arguments for the endif endwhile, else and endforeach commands. For example: if (FOO AND BAR) else () endif () The parenthesis are still required. I'm not sure what everyone's thoughts are on this but there it is... Ken ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] a backwards compatible language simplification
On Thursday 18 May 2006 19:56, Ken Martin wrote: I incorporated some changes from Lloyd's patch and committed it to CVS. Basically if a project sets CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS on then you can leave off the arguments for the endif endwhile, else and endforeach commands. For example: if (FOO AND BAR) else () endif () The parenthesis are still required. I'm not sure what everyone's thoughts are on this but there it is... That's nice already - changing 3 times the conditions in a if-else-endif construct was quite boring :-) Do you plan to also remove the parenthesis in a future release ? Gaetan pgptrEXOFyGXP.pgp Description: PGP signature ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
RE: [CMake] a backwards compatible language simplification
Having spent all day hacking a massive project using cmake, I wonder... could this FOREACH (foo ${foolist}) IF (${foo} STREQUAL bar) ... ELSE (${foo} STREQUAL bar) ... ENDIF (${foo} STREQUAL bar) ENDFOREACH (foo ${foolist}) change to this: FOREACH (foo ${foolist}) IF (${foo} STREQUAL bar) ... ELSE ... ENDIF ENDFOREACH Temporarily supporting gunk after the ELSE/ENDIF/ENDFOREACH for migration? Well the ENDFOREACH only needs the iteration variable so your example could be changed to: FOREACH (foo ${foolist}) IF (${foo} STREQUAL bar) ... ELSE (${foo} STREQUAL bar) ... ENDIF (${foo} STREQUAL bar) ENDFOREACH (foo) But to answer the meat of your question I do not think it can be trivially changed to not require the extra text but I'll try to take a look at it over the next few days. Personally I like the extra text but I certainly understand how it might drive some folks batty. Ken ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake