Bill Hoffman escreveu:
So what exactly about the CMake language gives you this feel?

Hi, let me just add my opinion on this one. I really think that in a if clause, having to repeat the condition in the else, elseif and endif is a little too much verbose for my taste. The following snippet illustrates this issue

IF(NOT ${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
    set(outofbuild true)
ELSE(NOT ${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
    set(outofbuild false)
endif(NOT ${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR}

I know that we can disable this *feature*, but it isn't default. I know you did this to help programmers know which 'if' an 'endif' is related, but this kind of thing is normally done with comments. And in my example above since each branch has one line, the verbosity is unnecessary.

The set clause is also a little bit awkward. I really think that cmake began as a really simple language for simple things, but then it needed to support some complex stuff and some features were hammered into the language, and the simple syntax just couldn't afford it, and we ended up with the cmake script language we have now.

The main issue with CMake script isn't when writing a build script, but when writing auxiliary stuff, like a more elaborate Find*.cmake. Just look at FindwxWidgets.cmake to see what I mean...

Best regards,
rod

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

Reply via email to