소스 검색

[cmake] Add SPINE_SET_COMPILER_FLAGS (#2698)

* Add SPINE_SET_COMPILER_FLAGS

* remove newline
hsdk123 7 달 전
부모
커밋
39c9caff0a
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      flags.cmake

+ 6 - 1
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()
+endif()