Tom,

I fixed the issue that was probably causing the inline check to misbehave for you.  Would you delete cache and give it another try?  It should now fail 'inline' and pass '__inline__' as intended.  Tested your new BRLCAD_ENABLE_STRICT_C89=ON build mode, and it seemed to do the trick right.

The problem was actually build files in src/other getting loaded and run before our -std= checks, causing the check to end up with the wrong result.

Cheers!
Sean

p.s. That BRLCAD_ENABLE_STRICT_C89 flag needs to be documented in the INSTALL file, especially if it's going to be in the summary output.  What do you think about a generalized ENABLE_POSIX_COMPLIANT flag name that can be c89 now and c99/c04/whatever later? 


On Sep 24, 2013, at 12:51 PM, [email protected] wrote:

Revision: 57869
http://sourceforge.net/p/brlcad/code/57869
Author: brlcad
Date: 2013-09-24 16:51:08 +0000 (Tue, 24 Sep 2013)
Log Message:
-----------
reverting r57867 for a variety of reasons: this module should not rely on BRLCAD_* logic (it's implemented as a proper CMake extension), should be testing 'inline' first or we can end up with different inline behavior on c99 compilers, and this change didn't update the documentation that was specific on the ordering and reasoning. the problem is that this needs to be tested *after* any std flags are set to ensure 'inline' will correctly fail the test.

Revision Links:
--------------
http://sourceforge.net/p/brlcad/code/57867

Modified Paths:
--------------
brlcad/trunk/misc/CMake/CheckCInline.cmake

Modified: brlcad/trunk/misc/CMake/CheckCInline.cmake
===================================================================
--- brlcad/trunk/misc/CMake/CheckCInline.cmake 2013-09-24 16:45:11 UTC (rev 57868)
+++ brlcad/trunk/misc/CMake/CheckCInline.cmake 2013-09-24 16:51:08 UTC (rev 57869)
@@ -65,16 +65,8 @@
# initialize to empty
set(${RESULT} "")

- # provision for strict C89 testing
- if (NOT BRLCAD_ENABLE_STRICT_C89)
- # C99 C89 other
- set(INLINE_STRINGS "inline" "__inline__" "__inline")
- else() # C89 other
- set(INLINE_STRINGS "__inline__" "__inline")
- endif()
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to