diff --git a/cmake/compiler_flags.cmake b/cmake/compiler_flags.cmake index 8c2be6e..388e687 100644 --- a/cmake/compiler_flags.cmake +++ b/cmake/compiler_flags.cmake @@ -152,7 +152,8 @@ function (add_cxx_preproc_definition preproc_def) string(FIND "${CMAKE_CXX_FLAGS}" "${preproc_def}" PREPROC_DEF_FOUND) if (${PREPROC_DEF_FOUND} EQUAL -1) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D${preproc_def}" PARENT_SCOPE) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D${preproc_def}" CACHE STRING "" + FORCE) endif () endfunction ()