mirror of
https://github.com/glest/glest-source.git
synced 2025-08-18 14:11:15 +02:00
Added cmake build files (thanks RCL)
This commit is contained in:
@@ -1,16 +1,21 @@
|
||||
AUX_SOURCE_DIRECTORY(libm/flt-32 libm_flt32_source)
|
||||
#########################################################################################
|
||||
# streflop
|
||||
#if (NOT $ENV{CXX} MATCHES "icpc")
|
||||
# SET(cxxflags "${cxxflags} -mfpmath=sse -msse")
|
||||
#endif (NOT $ENV{CXX} MATCHES "icpc")
|
||||
|
||||
SET(cxxflags "-w -O3 -I${CMAKE_CURRENT_SOURCE_DIR}/libm/headers")
|
||||
if (NOT $ENV{CXX} MATCHES "icpc")
|
||||
SET(cxxflags "${cxxflags} -mfpmath=sse -msse")
|
||||
endif (NOT $ENV{CXX} MATCHES "icpc")
|
||||
SET_SOURCE_FILES_PROPERTIES(${libm_flt32_source} PROPERTIES COMPILE_FLAGS "-DLIBM_COMPILING_FLT32 ${cxxflags}")
|
||||
FILE(GLOB_RECURSE STREFLOP_GLOBBED_CPP libm/flt-32/*.cpp)
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
../../include/streflop/libm/flt-32
|
||||
../../include/streflop/libm/headers
|
||||
)
|
||||
|
||||
SET(STREFLOP_SRC ${STREFLOP_GLOBBED_CPP})
|
||||
# use SSE unconditionally (FIXME?)
|
||||
SET_SOURCE_FILES_PROPERTIES(${STREFLOP_SRC} PROPERTIES COMPILE_FLAGS "-DSTREFLOP_SSE -DLIBM_COMPILING_FLT32 -O3 ${CXXFLAGS}")
|
||||
|
||||
ADD_LIBRARY(streflop STATIC EXCLUDE_FROM_ALL
|
||||
SMath.cpp
|
||||
Random.cpp
|
||||
streflopC.cpp
|
||||
${libm_flt32_source}
|
||||
${STREFLOP_SRC}
|
||||
)
|
||||
set_target_properties(streflop PROPERTIES COMPILE_FLAGS "${PIC_FLAG}")
|
||||
#TODO do not use -fPIC for streflop (decreases performance)
|
||||
|
Reference in New Issue
Block a user