[CMake] CXXFLAGS and CMAKE_REQUIRED_FLAGS correspondance

Mateusz Loskot mateusz at loskot.net
Wed Apr 29 16:50:50 EDT 2015


Hi,

Let's consider 32-bit build target on 64-bit host,
is this canonical way of setting the flags?

CXXFLAGS="-m32" cmake ../src

# in my CMakeLists.txt
CMAKE_REQUIRED_FLAGS=${CXXFLAGS}

If I don't set CMAKE_REQUIRED_FLAGS with -m32, then obviously
CheckSymbolExists (and others) may give unexpected results.

Best regards,
-- 
Mateusz  Loskot, http://mateusz.loskot.net


More information about the CMake mailing list