From e66286ebe30afc9acc4531fc2bea29b7fb924f93 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Mon, 30 May 2022 17:03:20 -0700 Subject: Changeset: 56 Buildsystem cleanup: change to layered structure for different targets --- buildtools/cmake/Exceptions.cmake | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 buildtools/cmake/Exceptions.cmake (limited to 'buildtools/cmake/Exceptions.cmake') diff --git a/buildtools/cmake/Exceptions.cmake b/buildtools/cmake/Exceptions.cmake deleted file mode 100644 index 89e7e69..0000000 --- a/buildtools/cmake/Exceptions.cmake +++ /dev/null @@ -1,31 +0,0 @@ -function(target_flag_exceptions_msvc TARGET_NAME ENABLED) - if(ENABLED) - target_compile_options(${TARGET_NAME} PRIVATE /EHsc) - else() - target_compile_options(${TARGET_NAME} PRIVATE /EH-) - endif() -endfunction() - -function(target_flag_exceptions_gcc TARGET_NAME ENABLED) - if(ENABLED) - target_compile_options(${TARGET_NAME} PRIVATE -fexceptions) - else() - target_compile_options(${TARGET_NAME} PRIVATE -fno-exceptions) - endif() -endfunction() - -function(target_flag_exceptions TARGET_NAME ENABLED) - if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - target_flag_exceptions_msvc(${TARGET_NAME} ${ENABLED}) - elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - if(CMAKE_CXX_COMPILER_FRONTEND_VARIANT MATCHES "MSVC") - target_flag_exceptions_msvc(${TARGET_NAME} ${ENABLED}) - elseif(CMAKE_CXX_COMPILER_FRONTEND_VARIANT MATCHES "GNU") - target_flag_exceptions_gcc(${TARGET_NAME} ${ENABLED}) - endif() - elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") - target_flag_exceptions_gcc(${TARGET_NAME} ${ENABLED}) - else() - message(FATAL "target_flag_exceptions(): Unknown compiler ${CMAKE_CXX_COMPILER_ID}") - endif() -endfunction() -- cgit v1.2.3-70-g09d2