From 39c9caff0ae48deb2ad7ebf88ad7119327106ec7 Mon Sep 17 00:00:00 2001 From: hsdk123 Date: Wed, 18 Dec 2024 06:45:50 -0500 Subject: [PATCH] [cmake] Add SPINE_SET_COMPILER_FLAGS (#2698) * Add SPINE_SET_COMPILER_FLAGS * remove newline --- flags.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/flags.cmake b/flags.cmake index 07ecfe486..f260682fe 100644 --- a/flags.cmake +++ b/flags.cmake @@ -1,4 +1,9 @@ option(SPINE_SANITIZE "Build with sanitization" OFF) +option(SPINE_SET_COMPILER_FLAGS "Set compiler flags" ON) + +if (NOT SPINE_SET_COMPILER_FLAGS) + return(); +endif() if(MSVC) message("MSCV detected") @@ -11,4 +16,4 @@ else() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fsanitize=undefined") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fsanitize=undefined") endif() -endif() \ No newline at end of file +endif()