File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed
Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ get_filename_component( C_COMPILER_NAME ${CMAKE_C_COMPILER} NAME_WE )
180180# message( "CMAKE_C_COMPILER: " ${CMAKE_C_COMPILER} )
181181
182182# Set common compile and link options
183- if ( C_COMPILER_NAME STREQUAL "cl" )
183+ if ( MSVC )
184184 # Following options for nMake
185185 message ( STATUS "Detected MSVS Ver: " ${MSVC_VERSION} )
186186
@@ -210,8 +210,6 @@ elseif( CMAKE_COMPILER_IS_GNUCXX )
210210 set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage" )
211211 set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage" )
212212 endif ()
213- else ( )
214- message ( FATAL_ERROR "Compiler not supported or not detected" )
215213endif ( )
216214
217215# If UNICODE is defined for microsoft compilers, pass extra definitions
Original file line number Diff line number Diff line change @@ -33,10 +33,12 @@ set( Client.Files ${Client.Source} ${Client.Headers} )
3333set ( DL_LIB "" )
3434if ( WIN32 )
3535 add_definitions ( "/D_CONSOLE" )
36- else ()
36+ elseif ( APPLE )
37+ set ( CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ ${CMAKE_CXX_FLAGS} " )
38+ else ( )
3739 # To use the dlopen() and dlclose() functions, we should link with libdl
3840 set ( DL_LIB "-ldl" )
39- endif ()
41+ endif ( )
4042
4143# Include standard OpenCL headers
4244include_directories ( ${Boost_INCLUDE_DIRS} ${OPENCL_INCLUDE_DIRS} ../../../common ${PROJECT_BINARY_DIR} /include ../include )
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ set_target_properties( StatTimer PROPERTIES SOVERSION ${CLFFT_SOVERSION} )
6969set_target_properties ( StatTimer PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR} /staging" )
7070target_link_libraries ( StatTimer ${OPENCL_LIBRARIES} )
7171
72- if ( UNIX )
72+ if ( UNIX AND NOT APPLE )
7373 # This library dependency is brought in by the high precision timer available in linux
7474 target_link_libraries ( StatTimer -lrt )
7575endif ( )
Original file line number Diff line number Diff line change @@ -57,6 +57,9 @@ if( MINGW )
5757elseif ( CMAKE_COMPILER_IS_GNUCXX )
5858 set ( CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS} " )
5959 set ( LD_PTHREAD "-lpthread" )
60+ elseif ( APPLE )
61+ set ( CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ ${CMAKE_CXX_FLAGS} " )
62+ add_definitions ( -DGTEST_USE_OWN_TR1_TUPLE )
6063endif ( )
6164
6265# Include standard OpenCL headers
You can’t perform that action at this time.
0 commit comments