2

Using Cmake, we use the following command

cmake CMakeLists.txt -G "Visual Studio 11"

to generate a Visual Studio 2012 solution file, which by-default uses /fp:precise as floating point option. Is there any way to change this to /fp:fast in CMake?

1 Answer 1

5

You can specify options with various CMake variables, e.g. CMAKE_CXX_FLAGS, CMAKE_CXX_FLAGS_RELEASE, CMAKE_CXX_FLAGS_DEBUG for C++ compiler options. Try set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:fast"). I think you can also change them from within the GUI (tick the Advanced checkmark). For C you'd have to use the CMAKE_C_FLAGS... variants.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.