The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=14571 ====================================================================== Reported By: Magnus Johansson Assigned To: ====================================================================== Project: CMake Issue ID: 14571 Category: CMake Reproducibility: random Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2013-11-15 08:19 EST Last Modified: 2013-11-15 08:19 EST ====================================================================== Summary: CMake does not validate cache entries given on the command line Description: Typically you set a cache entry like this:
cmake -DMYFLAG:string=ON However, cmake also accepts this degenerate case: cmake -D:string=ON When called like this I got very strange build failures: [ 32%] Building C object progs/bkz/prog/CMakeFiles/bkz.dir/bkz.c.o cd /import/build/magnus/rembuild/boks/redhat-6.0/progs/bkz/prog && /usr/bin/cc -I/import/build/magnus/rembuild/boks/redhat-6.0/BUILD/include -o CMakeFiles/bkz.dir/bkz.c.o -c /import/build/mj/boks-sources/boks/progs/bkz/prog/bkz.c Linking C executable ONbkz Note that when linking, bkz had received the prefix "ON" which shouldn't be there, and caused subsequent errors. (CMake got called with bad input like this due to a bug in our build scripts, where a variable was sometimes not set. This was very hard to track down. If CMake had validated the input, this would have been much easier to find.) ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2013-11-15 08:19 Magnus JohanssonNew Issue ====================================================================== -- 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