[Cmake] Adjusting compiler optimization for msvc

Bill Hoffman bill.hoffman at kitware.com
Wed May 21 10:46:54 EDT 2003


Yes, I think you would have to set the source file properties on
the .cxx files from the template directory.  

It would be something like this:


AUX_SOURCE_DIRECTORY(dir VARIABLE)

IF(CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE MATCHES "Windows-cl")
 FOREACH( f ${sources} ) 
   IF(${f} MATCHES vil2_bicub_interp)
      SET_SOURCE_FILES_PROPERTIES(${f} COMPILE_FLAGS -Od)
   ENDIF(${f} MATCHES vil2_bicub_interp)
 ENDFOREACH(f)
ENDIF(CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE MATCHES "Windows-cl")


At 10:24 AM 5/21/2003, Wheeler, Frederick W (Research) wrote:

>Is there something analogous to this for msvc?
>
>IF(CMAKE_COMPILER_IS_GNUCXX)
>  SET_SOURCE_FILES_PROPERTIES(test_mil.cxx COMPILE_FLAGS -O0)
>ENDIF(CMAKE_COMPILER_IS_GNUCXX)
>
>I'd like to disable optimization for one file in VXL when compiling with
>msvc 6.0.    With optimization, msvc produces bad code for one particular
>file (vxl_src/core/vil2/vil2_bicub_interp.txx).  It's a txx file.  Would I
>actually use a SET_SOURCE_FILES_PROPERTIES command on the .cxx files in the
>Templates directory?
>
>Thanks,
>Fred Wheeler
>_______________________________________________
>Cmake mailing list
>Cmake at public.kitware.com
>http://public.kitware.com/mailman/listinfo/cmake 






More information about the CMake mailing list