[Insight-developers] CMake Configuration Anomolies for redhat9
gcc 3.2
Brad King
brad.king at kitware.com
Mon, 12 Jan 2004 11:45:58 -0500 (EST)
On Mon, 12 Jan 2004, Hans J. Johnson wrote:
> clean build has been done for both of these. The main difference
> between the two builds is that one is "-g" and the other is "-O3".
> Here is the diff between the two CMakeCache.txt files:
>
> 17c17
> < BUILDNAME:STRING=Linux-g++-3.2-dbg
> ---
> > BUILDNAME:STRING=Linux-g++-3.2-opt
> 74c74
> < CMAKE_CXX_FLAGS:STRING= -g -fstrict-aliasing -UNDEBUG -Wall
> -Wcast-qual -Wstrict-prototypes
> ---
> > CMAKE_CXX_FLAGS:STRING= -DNDEBUG -O3 -funroll-loops
> -fno-omit-frame-pointer -fstrict-aliasing
> 95c95
> < CMAKE_C_FLAGS:STRING= -g -UNDEBUG -Wall -Wstrict-prototypes
> ---
> > CMAKE_C_FLAGS:STRING= -DNDEBUG -O3 -funroll-loops
> -fno-omit-frame-pointer
> 1350c1350
> < HAVE__DOPRNT_COMPILED:INTERNAL=FALSE
> ---
> > HAVE__DOPRNT_COMPILED:INTERNAL=TRUE
> 1352c1352
> < HAVE__SYSTEM_CONFIGURATION_COMPILED:INTERNAL=FALSE
> ---
> > HAVE__SYSTEM_CONFIGURATION_COMPILED:INTERNAL=TRUE
> 1941,1942c1941,1942
> < //Test
> < VCL_STATIC_CONST_INIT_NO_DEFN:INTERNAL=0
> ---
> > //VXL test
> > VCL_STATIC_CONST_INIT_NO_DEFN:INTERNAL=1
This is the same CMake bug that causes problems with the Intel compiler.
Its built-in CHECK_VARIABLE_EXISTS test is always returning true when
optimization is on. This was never noticed because CHECK_VARIABLE_EXISTS
is rarely used and most dashboards use debug flags. This bug will be
fixed in CMake 1.8.4. Until then, please just manually switch the values
in the optimized build for your dashboard.
Thanks,
-Brad