mirror of
https://github.com/recp/cglm.git
synced 2025-12-25 04:44:58 +00:00
CMake: Fix incorrect compiler flags (#139)
* Fix CMake compiler args. - Replace -stdlib=libc++ with -std=gnu11 & apply it to clang too. - Remove redundant -fstrict-aliasing. - Remove warned and redundant -Weverything
This commit is contained in:
@@ -24,11 +24,12 @@ if(MSVC)
|
||||
add_definitions(-DNDEBUG -D_WINDOWS -D_USRDLL -DCGLM_EXPORTS -DCGLM_DLL)
|
||||
add_compile_options("/W3" "/Ox" "/Gy" "/Oi" "/TC" "/analyze")
|
||||
else()
|
||||
add_compile_options("-Wall" "-Werror" "-O3")
|
||||
add_compile_options("-Wall" "-Werror" "-std=gnu11" "-O3")
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
add_compile_options("-stdlib=libc++" "-Weverything")
|
||||
# Currently, nothing special to be seen here.
|
||||
else()
|
||||
add_compile_options("-Werror=strict-prototypes" "-fstrict-aliasing")
|
||||
add_compile_options("-Werror=strict-prototypes")
|
||||
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user