This commit is contained in:
2025-12-09 02:34:16 +05:30
parent 3ed23336e2
commit 71d83859f5
4 changed files with 44 additions and 44 deletions

View File

@ -18,18 +18,7 @@ include(CMake/FindDeps.cmake)
# Default to ON if root, OFF if dependency
option(IACore_BUILD_TESTS "Build unit tests" ${PROJECT_IS_TOP_LEVEL})
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
message(STATUS "Configuring IACore for Debug..")
add_compile_options(-O0 -g)
add_compile_definitions("__IA_DEBUG=1")
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
message(STATUS "Configuring IACore for Release..")
add_compile_options(-O3 -g0)
add_compile_definitions("__IA_DEBUG=0")
else()
message(FATAL_ERROR "Unknown CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\"")
endif()
message(STATUS "Configured IACore for Multi-Config (Debug/Release rules generated)")
message(STATUS "Detected Compiler ID: ${CMAKE_CXX_COMPILER_ID}")
# Check if the compiler is MSVC (cl.exe), but allow Clang acting like MSVC (clang-cl)