Skip to content

Commit

Permalink
Setup compilers independently
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro Alfonso committed Dec 5, 2023
1 parent 93dd829 commit df3fe5c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ set(BLACKSMITH_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
set(BLACKSMITH_LIBS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib)

# Compiler-specific flags
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic -Werror")
else()
set(CMAKE_CXX_FLAGS "-W4 -WX -EHsc")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic -Werror -Os")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(CMAKE_CXX_FLAGS "-W4 -WX -EHsc -Os")
endif()

set(CMAKE_CXX_FLAGS_RELEASE "-Os")
Expand Down

0 comments on commit df3fe5c

Please sign in to comment.