build-native.sh has options cmakeargs for passing additional arguments to CMake. But if I want add -D_FORTIFY_SOURCE=2 option to CXXFLAGS it will be applied to corefx/src/Native/Unix/configure.cmake (which cause errors on test programs compilation).
If I add this option to corefx/src/Native/Unix/CMakeLists.txt it will applied to source code only (as expected).
Is there other way to pass this and others options to build without patching source code? If not is it possible to change cmakeargs behavior or add some other logic?
This behavior is the same for CoreCLR too.
cc @BruceForstall @jkotas
cc @chunseoklee
build-native.shhas optionscmakeargsfor passing additional arguments to CMake. But if I want add-D_FORTIFY_SOURCE=2option toCXXFLAGSit will be applied tocorefx/src/Native/Unix/configure.cmake(which cause errors on test programs compilation).If I add this option to
corefx/src/Native/Unix/CMakeLists.txtit will applied to source code only (as expected).Is there other way to pass this and others options to build without patching source code? If not is it possible to change
cmakeargsbehavior or add some other logic?This behavior is the same for CoreCLR too.
cc @BruceForstall @jkotas
cc @chunseoklee