diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 0b9810d90a..241664e38b 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -1,7 +1,7 @@ if (CK_BUILD_JIT_LIB) - remove_definitions(-Wglobal-constructors) + string(REPLACE "-Werror;" "" CMAKE_COMPILER_WARNINGS "${CMAKE_COMPILER_WARNINGS}") add_subdirectory(src/jit_library) - add_definitions(-Wglobal-constructors) + set(CMAKE_COMPILER_WARNINGS "${CMAKE_COMPILER_WARNINGS};-Werror") else() add_subdirectory(src/tensor_operation_instance/gpu) add_subdirectory(src/utility)