MantisBT - CMake
View Issue Details
0009594CMakeCMakepublic2009-09-25 08:542016-06-10 14:31
paul Wohlhart 
Kitware Robot 
normalfeaturehave not tried
closedmoved 
CMake-2-6 
 
0009594: Cannot set OpenMP="true" in VCCLCompilerTool in .vcproj file
For OpenMP to work in VS 2008 there has to be an OpenMP flag set to "true" in the VCCLCompilerTool of the project.

With FindOpenMP i can get the C, CXX and linker flags, but cannot set the flag in the tool.

A possible fix would be to add
  {"OpenMP", "openmp", "Open MP", "true", 0},
to the
  cmLocalVisualStudio7GeneratorFlagTable[]

(Source\cmLocalVisualStudio7Generator.cxx Revision: 1.217.2.15, line 385)

and set the flag by adding

  ADD_DEFINITIONS(${OpenMP_CXX_FLAGS})

to the cmake file,
although I do not know if that has side effects.
No tags attached.
Issue History
2009-09-25 08:54paul WohlhartNew Issue
2009-09-25 08:57paul WohlhartNote Added: 0017742
2009-09-25 12:06Bill HoffmanStatusnew => assigned
2009-09-25 12:06Bill HoffmanAssigned To => David Cole
2011-10-25 22:40David ColeAssigned ToDavid Cole =>
2011-10-25 22:40David ColeStatusassigned => backlog
2016-06-10 14:27Kitware RobotNote Added: 0041597
2016-06-10 14:27Kitware RobotStatusbacklog => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:27Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0017742)
paul Wohlhart   
2009-09-25 08:57   
The resulting VCCLCompilerTool section looks like
this for my project (except for the [...] which I cut)

<Tool
    Name="VCCLCompilerTool"
    AdditionalOptions=" /Zm1000"
    AdditionalIncludeDirectories="[...]"
    BasicRuntimeChecks="3"
    CompileAs="2"
    DebugInformationFormat="3"
    ExceptionHandling="1"
    InlineFunctionExpansion="0"
    OpenMP="true"
    Optimization="0"
    RuntimeLibrary="3"
    RuntimeTypeInfo="TRUE"
    WarningLevel="3"
    PreprocessorDefinitions="WIN32,_WINDOWS,NOMINMAX,_DEBUG,/openmp,_CRT_SECURE_NO_DEPRECATE,_CRT_NONSTDC_NO_DEPRECATE,_CRT_SECURE_NO_DEPRECATE_GLOBALS,SIEMENS_REMOVE_DEBUG_CODE_FLAG,IPP_FLOAT,_USE_MATLAB_ENGINE,CMAKE_INTDIR=\"Debug\""
    AssemblerListingLocation="Debug"
    ObjectFile="$(IntDir)\"
    ProgramDataBaseFileName="[...]"
/>
(0041597)
Kitware Robot   
2016-06-10 14:27   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.