mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-04 01:51:06 +00:00
Merge branch 'cmake_clang'
This commit is contained in:
commit
bc34894378
1 changed files with 4 additions and 3 deletions
|
@ -19,8 +19,8 @@
|
|||
|
||||
# CMake based build system. Pedro Lopez-Cabanillas <plcl@users.sf.net>
|
||||
|
||||
cmake_minimum_required ( VERSION 3.0.2 )
|
||||
project ( FluidSynth C )
|
||||
cmake_minimum_required ( VERSION 2.6.3 )
|
||||
set ( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake_admin )
|
||||
|
||||
# FluidSynth package name
|
||||
|
@ -136,18 +136,19 @@ unset ( FLUID_CPPFLAGS CACHE )
|
|||
unset ( FLUID_LIBS CACHE )
|
||||
|
||||
# Options for the GNU C compiler only
|
||||
if ( CMAKE_COMPILER_IS_GNUCC )
|
||||
if ( CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
||||
if ( NOT APPLE AND NOT OS2 )
|
||||
set ( CMAKE_EXE_LINKER_FLAGS
|
||||
"${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed" )
|
||||
set ( CMAKE_SHARED_LINKER_FLAGS
|
||||
"${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
|
||||
endif ( NOT APPLE AND NOT OS2 )
|
||||
|
||||
set ( GNUCC_WARNING_FLAGS "-Wall -W -Wpointer-arith -Wbad-function-cast -Wno-cast-qual -Wcast-align -Wstrict-prototypes -Wno-unused-parameter -Wdeclaration-after-statement" )
|
||||
set ( CMAKE_C_FLAGS_DEBUG "-std=gnu89 -g -fvisibility=hidden -DDEBUG ${GNUCC_WARNING_FLAGS}" )
|
||||
set ( CMAKE_C_FLAGS_RELEASE "-std=gnu89 -O2 -fomit-frame-pointer -funroll-all-loops -finline-functions -fvisibility=hidden -DNDEBUG ${GNUCC_WARNING_FLAGS}" )
|
||||
set ( CMAKE_C_FLAGS_RELWITHDEBINFO "-std=gnu89 -O2 -g -fomit-frame-pointer -funroll-all-loops -finline-functions -fvisibility=hidden -DNDEBUG ${GNUCC_WARNING_FLAGS}" )
|
||||
endif ( CMAKE_COMPILER_IS_GNUCC )
|
||||
endif ( CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
||||
|
||||
# Windows
|
||||
unset ( WINDOWS_SUPPORT CACHE )
|
||||
|
|
Loading…
Reference in a new issue